Corrected return value of ForeignKey.db_check().
Field.db_check() should return None or a SQL string. Returning [] happened to work because it’s falsey.
This commit is contained in:
parent
974e3b8750
commit
1be99e4e0a
|
@ -1035,7 +1035,7 @@ class ForeignKey(ForeignObject):
|
|||
})
|
||||
|
||||
def db_check(self, connection):
|
||||
return []
|
||||
return None
|
||||
|
||||
def db_type(self, connection):
|
||||
return self.target_field.rel_db_type(connection=connection)
|
||||
|
|
Loading…
Reference in New Issue