mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add ability to test event triggers (#6746)
This commit is contained in:
parent
ca8f0cee9f
commit
0a67975f16
@ -1221,6 +1221,9 @@ PLUGIN_RETRY = get_setting(
|
|||||||
) # How often should plugin loading be tried?
|
) # How often should plugin loading be tried?
|
||||||
PLUGIN_FILE_CHECKED = False # Was the plugin file checked?
|
PLUGIN_FILE_CHECKED = False # Was the plugin file checked?
|
||||||
|
|
||||||
|
# Flag to allow table events during testing
|
||||||
|
TESTING_TABLE_EVENTS = False
|
||||||
|
|
||||||
# User interface customization values
|
# User interface customization values
|
||||||
CUSTOM_LOGO = get_custom_file(
|
CUSTOM_LOGO = get_custom_file(
|
||||||
'INVENTREE_CUSTOM_LOGO', 'customize.logo', 'custom logo', lookup_media=True
|
'INVENTREE_CUSTOM_LOGO', 'customize.logo', 'custom logo', lookup_media=True
|
||||||
|
@ -117,7 +117,7 @@ def allow_table_event(table_name):
|
|||||||
return False # pragma: no cover
|
return False # pragma: no cover
|
||||||
|
|
||||||
# Prevent table events when in testing mode (saves a lot of time)
|
# 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
|
return False
|
||||||
|
|
||||||
table_name = table_name.lower().strip()
|
table_name = table_name.lower().strip()
|
||||||
|
Loading…
Reference in New Issue
Block a user