2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

Merge pull request #2805 from matmair/matmair/issue2385

Plugins for notifications
This commit is contained in:
Oliver
2022-05-06 20:00:56 +10:00
committed by GitHub
22 changed files with 620 additions and 124 deletions

View File

@ -523,7 +523,10 @@ class PluginsRegistry:
# check all models
for model in app_config.get_models():
# remove model from admin site
admin.site.unregister(model)
try:
admin.site.unregister(model)
except: # pragma: no cover
pass
models += [model._meta.model_name]
except LookupError: # pragma: no cover
# if an error occurs the app was never loaded right -> so nothing to do anymore