Add logging message when plugin fails to render custom panels
This commit is contained in:
parent
9446702d78
commit
7d9690b974
|
|
@ -1,3 +1,4 @@
|
|||
import logging
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
|
|
@ -9,6 +10,9 @@ from error_report.models import Error
|
|||
from plugin.registry import registry
|
||||
|
||||
|
||||
logger = logging.getLogger('inventree')
|
||||
|
||||
|
||||
class InvenTreePluginViewMixin:
|
||||
"""
|
||||
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(),
|
||||
)
|
||||
|
||||
logger.error(f"Plugin '{plug.slug}' could not render custom panels at '{self.request.path}'")
|
||||
|
||||
return panels
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
|
|
|
|||
Loading…
Reference in New Issue