mirror of
https://github.com/inventree/InvenTree.git
synced 2026-12-03 12:51:34 +00:00
Reduce plugin related warning messages during migrations (#13428)
- Database is not accessible during this time
This commit is contained in:
1 parent
a22b5da937
commit
39c22d2b9f
1 file changed
+6
-2
@@ -266,7 +266,10 @@ class PluginsRegistry:
|
||||
InvenTree.cache.set_session_cache(cache_key, configs)
|
||||
except (ProgrammingError, OperationalError):
|
||||
# The database is not ready yet
|
||||
logger.warning('plugin.registry.get_plugin_configs: Database not ready')
|
||||
if not InvenTree.ready.isRunningMigrations():
|
||||
logger.warning(
|
||||
'plugin.registry.get_plugin_configs: Database not ready'
|
||||
)
|
||||
return None
|
||||
|
||||
return configs
|
||||
@@ -422,7 +425,8 @@ class PluginsRegistry:
|
||||
|
||||
if configs is None:
|
||||
# The database is not ready yet
|
||||
logger.warning('plugin.registry.with_mixin: Database not ready')
|
||||
if not InvenTree.ready.isRunningMigrations():
|
||||
logger.warning('plugin.registry.with_mixin: Database not ready')
|
||||
return []
|
||||
|
||||
mixin = str(mixin).lower().strip()
|
||||
|
||||
Reference in new issue
Block a user