Add ability to test event triggers (#6746)

This commit is contained in:
Lavissa 2024-03-18 23:09:47 +01:00 committed by GitHub
parent ca8f0cee9f
commit 0a67975f16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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()