Skip to content

Commit 529bcfb

Browse files
committed
Define ObjectIdAutoField rel_db_type.
1 parent 17d8a5d commit 529bcfb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

django_mongodb/fields/auto.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ def get_prep_value(self, value):
3434
def db_type(self, connection):
3535
return "objectId"
3636

37+
def rel_db_type(self, connection):
38+
return "objectId"
39+
3740
def to_python(self, value):
3841
if value is None or isinstance(value, int):
3942
return value

0 commit comments

Comments
 (0)