mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
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
Block a user