Skip to content

Commit afd4c49

Browse files
authored
Fix base attributes are not set (#7)
1 parent 7f438d4 commit afd4c49

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pycognito/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,13 @@ def register(self, username, password, attr_map=None):
323323
}
324324
}
325325
"""
326-
attributes = self.base_attributes.copy()
326+
if self.base_attributes is None:
327+
attributes = {}
328+
else:
329+
attributes = self.base_attributes.copy()
327330
if self.custom_attributes:
328331
attributes.update(self.custom_attributes)
332+
329333
cognito_attributes = dict_to_cognito(attributes, attr_map)
330334
params = {
331335
"ClientId": self.client_id,

0 commit comments

Comments
 (0)