mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	PEP fix
This commit is contained in:
		| @@ -698,6 +698,7 @@ def clean_decimal(number): | |||||||
|  |  | ||||||
|     return clean_number.quantize(Decimal(1)) if clean_number == clean_number.to_integral() else clean_number.normalize() |     return clean_number.quantize(Decimal(1)) if clean_number == clean_number.to_integral() else clean_number.normalize() | ||||||
|  |  | ||||||
|  |  | ||||||
| def log_plugin_error(error, reference: str = 'general'): | def log_plugin_error(error, reference: str = 'general'): | ||||||
|     # make sure the registry is set up |     # make sure the registry is set up | ||||||
|     if reference not in settings.INTEGRATION_ERRORS: |     if reference not in settings.INTEGRATION_ERRORS: | ||||||
|   | |||||||
| @@ -169,7 +169,7 @@ class PluginAppConfig(AppConfig): | |||||||
|             if settings.PLUGIN_TESTING or (plugin_db_setting and plugin_db_setting.active): |             if settings.PLUGIN_TESTING or (plugin_db_setting and plugin_db_setting.active): | ||||||
|                 # check if the plugin was blocked -> threw an error |                 # check if the plugin was blocked -> threw an error | ||||||
|                 if disabled: |                 if disabled: | ||||||
|                     if plugin.__name__==disabled: |                     if plugin.__name__ == disabled: | ||||||
|                         # errors are bad so disable the plugin in the database |                         # errors are bad so disable the plugin in the database | ||||||
|                         # but only if not in testing mode as that breaks in the GH pipeline |                         # but only if not in testing mode as that breaks in the GH pipeline | ||||||
|                         if not settings.PLUGIN_TESTING: |                         if not settings.PLUGIN_TESTING: | ||||||
|   | |||||||
| @@ -52,6 +52,7 @@ def safe_url(view_name, *args, **kwargs): | |||||||
|     except: |     except: | ||||||
|         return None |         return None | ||||||
|  |  | ||||||
|  |  | ||||||
| @register.simple_tag() | @register.simple_tag() | ||||||
| def plugin_errors(*args, **kwargs): | def plugin_errors(*args, **kwargs): | ||||||
|     """Return all plugin errors""" |     """Return all plugin errors""" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user