Skip to content

Commit 33fa482

Browse files
fix: create_user_from_context_with_unknown_data_fields (#78)
Co-authored-by: Jonathan Norris <jonathan@taplytics.com>
1 parent 7caa6a0 commit 33fa482

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

devcycle_python_sdk/models/user.py

+1-1
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

+2-2
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)