mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #27629 -- Added router.allow_relation() calls for assignments between unsaved model instances.
This commit is contained in:
committed by
Tim Graham
parent
9c4ea63e87
commit
a5a2ceeb45
@@ -319,7 +319,10 @@ class OtherRouter:
|
||||
return self.db_for_read(model, **hints)
|
||||
|
||||
def allow_relation(self, obj1, obj2, **hints):
|
||||
return None
|
||||
# ContentType objects are created during a post-migrate signal while
|
||||
# performing fixture teardown using the default database alias and
|
||||
# don't abide by the database specified by this router.
|
||||
return True
|
||||
|
||||
def allow_migrate(self, db, app_label, **hints):
|
||||
return True
|
||||
|
||||
Reference in New Issue
Block a user