From 7c9ba1007d757484f1d31d9b47f74f22925dd78f Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 17 Nov 2021 01:51:47 +0100 Subject: [PATCH] refactor --- InvenTree/plugin/apps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/plugin/apps.py b/InvenTree/plugin/apps.py index ba4aa575f8..9232eda992 100644 --- a/InvenTree/plugin/apps.py +++ b/InvenTree/plugin/apps.py @@ -219,11 +219,11 @@ class PluginAppConfig(AppConfig): self._reload_apps(populate=True) self._reload_apps() # rediscover models/ admin sites - self._reload_contrib() + self._reregister_contrib_apps() # update urls - must be last as models must be registered for creating admin routes self._update_urls() - def _reload_contrib(self): + def _reregister_contrib_apps(self): """fix reloading of contrib apps - models and admin this is needed if plugins were loaded earlier and then reloaded as models and admins rely on imports those register models and admin in their respective objects (e.g. admin.site for admin)