Merge pull request #300 from spametki/master

MongoDB: fixed object_id function (hex values)
This commit is contained in:
mdipierro committed 2013-11-17 07:15:33 -08:00
commit a6e8111484
1 file changed
+2 -1
+2 -1
View File
@@ -5555,7 +5555,8 @@ class MongoDBAdapter(NoSQLAdapter):
if arg == 0: if arg == 0:
hexvalue = "".zfill(24) hexvalue = "".zfill(24)
else: else:
hexvalue = hex(arg)[2:].replace("L", "") hexvalue = hex(arg
).split("x")[-1].replace("L", "").zfill(24)
return self.ObjectId(hexvalue) return self.ObjectId(hexvalue)
def parse_reference(self, value, field_type): def parse_reference(self, value, field_type):