diff --git a/django/core/management/validation.py b/django/core/management/validation.py index af15752f0f..c0452c5aa6 100644 --- a/django/core/management/validation.py +++ b/django/core/management/validation.py @@ -35,9 +35,6 @@ def get_validation_errors(outfile, app=None): for (app_name, error) in get_app_errors().items(): e.add(app_name, error) - inc = set(models.get_models(app, include_swapped=True)) - no_inc = set(models.get_models(app)) - for cls in models.get_models(app, include_swapped=True): opts = cls._meta