mirror of https://github.com/django/django.git
Used allow_migrate_model() shortcut in Field._check_backend_specific_checks().
This commit is contained in:
parent
e07e83589b
commit
48b6108e50
|
@ -411,12 +411,9 @@ class Field(RegisterLookupMixin):
|
|||
def _check_backend_specific_checks(self, databases=None, **kwargs):
|
||||
if databases is None:
|
||||
return []
|
||||
app_label = self.model._meta.app_label
|
||||
errors = []
|
||||
for alias in databases:
|
||||
if router.allow_migrate(
|
||||
alias, app_label, model_name=self.model._meta.model_name
|
||||
):
|
||||
if router.allow_migrate_model(alias, self.model):
|
||||
errors.extend(connections[alias].validation.check_field(self, **kwargs))
|
||||
return errors
|
||||
|
||||
|
|
Loading…
Reference in New Issue