Skip to content

Commit 346253f

Browse files
committed
fix create_user_from_context_with_unknown_data_fields
1 parent c5a2565 commit 346253f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

devcycle_python_sdk/models/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def create_user_from_context(
125125
if key == "user_id":
126126
continue
127127

128-
if value:
128+
if value is not None:
129129
if key == "email" and isinstance(value, str):
130130
user.email = value
131131
elif key == "name" and isinstance(value, str):

test/models/test_user.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def test_create_user_from_context_with_unknown_data_fields(self):
129129
"strValue": "hello",
130130
"intValue": 123,
131131
"floatValue": 3.1456,
132-
"boolValue": True,
132+
"boolValue": False,
133133
},
134134
)
135135
user = DevCycleUser.create_user_from_context(context)
@@ -143,7 +143,7 @@ def test_create_user_from_context_with_unknown_data_fields(self):
143143
"strValue": "hello",
144144
"intValue": 123,
145145
"floatValue": 3.1456,
146-
"boolValue": True,
146+
"boolValue": False,
147147
},
148148
)
149149
self.assertEqual(user.privateCustomData, None)

0 commit comments

Comments
 (0)