From ebaa7d64a82ef02e724a21a5b0221bb7f7cb1dc5 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 31 Oct 2023 15:47:59 +1100 Subject: [PATCH] Skip plugin registry reload if performing django functions (#5823) * Skip plugin registry reload if performing django functions * Revert changes to pre-commit --- InvenTree/plugin/registry.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InvenTree/plugin/registry.py b/InvenTree/plugin/registry.py index e5c4e14392..9af87a56d8 100644 --- a/InvenTree/plugin/registry.py +++ b/InvenTree/plugin/registry.py @@ -699,6 +699,10 @@ class PluginsRegistry: # Skip if running during unit testing return + if not canAppAccessDatabase(allow_shell=True): + # Skip check if database cannot be accessed + return + logger.debug("Checking plugin registry hash") # If not already cached, calculate the hash