2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

Add logging message when plugin fails to render custom panels

This commit is contained in:
Oliver 2022-05-19 09:53:12 +10:00
parent 9446702d78
commit 7d9690b974

View File

@ -1,3 +1,4 @@
import logging
import sys import sys
import traceback import traceback
@ -9,6 +10,9 @@ from error_report.models import Error
from plugin.registry import registry from plugin.registry import registry
logger = logging.getLogger('inventree')
class InvenTreePluginViewMixin: class InvenTreePluginViewMixin:
""" """
Custom view mixin which adds context data to the view, Custom view mixin which adds context data to the view,
@ -42,6 +46,8 @@ class InvenTreePluginViewMixin:
html=ExceptionReporter(self.request, kind, info, data).get_traceback_html(), html=ExceptionReporter(self.request, kind, info, data).get_traceback_html(),
) )
logger.error(f"Plugin '{plug.slug}' could not render custom panels at '{self.request.path}'")
return panels return panels
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):