diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index 2897b6d614..ff322ac10d 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -1221,6 +1221,9 @@ PLUGIN_RETRY = get_setting( ) # How often should plugin loading be tried? PLUGIN_FILE_CHECKED = False # Was the plugin file checked? +# Flag to allow table events during testing +TESTING_TABLE_EVENTS = False + # User interface customization values CUSTOM_LOGO = get_custom_file( 'INVENTREE_CUSTOM_LOGO', 'customize.logo', 'custom logo', lookup_media=True diff --git a/InvenTree/plugin/base/event/events.py b/InvenTree/plugin/base/event/events.py index 125d1b17bf..752a7a8d85 100644 --- a/InvenTree/plugin/base/event/events.py +++ b/InvenTree/plugin/base/event/events.py @@ -117,7 +117,7 @@ def allow_table_event(table_name): return False # pragma: no cover # Prevent table events when in testing mode (saves a lot of time) - if settings.TESTING: + if settings.TESTING and not settings.TESTING_TABLE_EVENTS: return False table_name = table_name.lower().strip()