1. Luke Plant
  2. django


mtre...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 8fa71e9

Fixed #8569 -- Ensure that apps are correctly set up before introspecting them
in admin validation.

  • Participants
  • Parent commits 41bb847
  • Branches default

Comments (0)

Files changed (1)

File django/contrib/admin/validation.py

View file
  • Ignore whitespace
     classmethod in the end if it is provided in cls. The signature of the
     custom validation classmethod should be: def validate(cls, model).
+    # Before we can introspect models, they need to be fully loaded so that
+    # inter-relations are set up correctly. We force that here.
+    models.get_apps()
     opts = model._meta
     validate_base(cls, model)