summaryrefslogtreecommitdiff
path: root/tests/gis_tests/layermap/tests.py
diff options
context:
space:
mode:
authorStefan R. Filipek <srfilipek@gmail.com>2018-05-10 20:42:44 -0400
committerTim Graham <timograham@gmail.com>2018-05-10 20:42:44 -0400
commita5a2ceeb453b86caaf01687342984f372428beb8 (patch)
tree487d4dcbc5122d74adc0f5a99657e2ac329a594e /tests/gis_tests/layermap/tests.py
parent9c4ea63e878c053600c284e32d5f32d27a59b63a (diff)
Fixed #27629 -- Added router.allow_relation() calls for assignments between unsaved model instances.
Diffstat (limited to 'tests/gis_tests/layermap/tests.py')
-rw-r--r--tests/gis_tests/layermap/tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gis_tests/layermap/tests.py b/tests/gis_tests/layermap/tests.py
index 1ebeeb31c6..2406533e66 100644
--- a/tests/gis_tests/layermap/tests.py
+++ b/tests/gis_tests/layermap/tests.py
@@ -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