mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Updated allow_migrate() signature in check framework tests
This commit is contained in:
@@ -7,8 +7,8 @@ class TestRouter(object):
|
||||
"""
|
||||
Routes to the 'other' database if the model name starts with 'Other'.
|
||||
"""
|
||||
def allow_migrate(self, db, app_label, model=None, **hints):
|
||||
return db == ('other' if model._meta.verbose_name.startswith('other') else 'default')
|
||||
def allow_migrate(self, db, app_label, model_name=None, **hints):
|
||||
return db == ('other' if model_name.startswith('other') else 'default')
|
||||
|
||||
|
||||
@override_settings(DATABASE_ROUTERS=[TestRouter()])
|
||||
|
||||
Reference in New Issue
Block a user