Skip to content

Commit cc4a3a8

Browse files
author
Valentin Gorbunov
committed
Fix for pk=SequenceField()
1 parent 33bb9e3 commit cc4a3a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mongodbforms/fields.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ def clean(self, value):
8181
return None
8282

8383
try:
84-
oid = ObjectId(value)
84+
#oid = ObjectId(value)
85+
oid = value # Fix for pk=SequenceField()
8586
oid = super(ReferenceField, self).clean(oid)
8687

8788
queryset = self.queryset.clone()

0 commit comments

Comments
 (0)