mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Add ability to test event triggers (#6746)
This commit is contained in:
		@@ -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()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user