You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the case where a field used in variant assignment has a value of zero, the function _getOrigHashValue will return an empty string and claim that the hashAttribute value is empty, even though that an attribute field with value 0 might have real meaning (i.e. the first user). That is,
self._attributes = {"id": 0}
_getOrigHashValue("id") would output ""
This is because _getOrigHashValue evaluates 0 or "" as false or false since they both are "falsy values", and as a result, it will return the last element of the comparison.
In the case where a field used in variant assignment has a value of zero, the function
_getOrigHashValue
will return an empty string and claim that the hashAttribute value is empty, even though that an attribute field with value 0 might have real meaning (i.e. the first user). That is,This is because
_getOrigHashValue
evaluates0 or ""
asfalse or false
since they both are "falsy values", and as a result, it will return the last element of the comparison.growthbook-python/growthbook.py
Lines 892 to 898 in d55de08
While a relative edge case, it might be worth updating
_getOrigHashValue
to handle a 0 value.The text was updated successfully, but these errors were encountered: