We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
HexIntegerField.get_prep_value
1 parent ff23c6e commit 5334f33Copy full SHA for 5334f33
push_notifications/fields.py
@@ -53,7 +53,8 @@ def db_type(self, connection):
53
def get_prep_value(self, value):
54
if value is None or value == "":
55
return None
56
- value = int(value, 16)
+ if isinstance(value, six.string_types):
57
+ value = int(value, 16)
58
# on postgres only, interpret as signed
59
if connection.settings_dict["ENGINE"] in postgres_engines:
60
value = struct.unpack("q", struct.pack("Q", value))[0]
0 commit comments