From 7959ba86bd0b3e32f8b906b8cfbfc52ef2a89e51 Mon Sep 17 00:00:00 2001
From: Ivan Dominic Baguio <baguio.ivan@gmail.com>
Date: Fri, 12 Aug 2022 02:07:48 +0800
Subject: [PATCH] Move app_config initialization inside if block
---
django/db/models/base.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 1f7e5f84aa..4373b4a278 100644
a
|
b
|
class ModelBase(type):
|
123 | 123 | |
124 | 124 | app_label = None |
125 | 125 | |
126 | | # Look for an application configuration to attach the model to. |
127 | | app_config = apps.get_containing_app_config(module) |
128 | | |
129 | 126 | if getattr(meta, "app_label", None) is None: |
| 127 | # Look for an application configuration to attach the model to. |
| 128 | app_config = apps.get_containing_app_config(module) |
| 129 | |
130 | 130 | if app_config is None: |
131 | 131 | if not abstract: |
132 | 132 | raise RuntimeError( |