Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devcycle_python_sdk/models/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def create_user_from_context(
if key == "user_id":
continue

if value:
if value is not None:
if key == "email" and isinstance(value, str):
user.email = value
elif key == "name" and isinstance(value, str):
Expand Down
4 changes: 2 additions & 2 deletions test/models/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_create_user_from_context_with_unknown_data_fields(self):
"strValue": "hello",
"intValue": 123,
"floatValue": 3.1456,
"boolValue": True,
"boolValue": False,
},
)
user = DevCycleUser.create_user_from_context(context)
Expand All @@ -143,7 +143,7 @@ def test_create_user_from_context_with_unknown_data_fields(self):
"strValue": "hello",
"intValue": 123,
"floatValue": 3.1456,
"boolValue": True,
"boolValue": False,
},
)
self.assertEqual(user.privateCustomData, None)
Expand Down
Loading