From e57a3870c6af815ba786c855fbd5ec7dda7eecb4 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 7 May 2022 22:47:48 +1000 Subject: [PATCH] Fix build index template --- InvenTree/build/views.py | 2 +- InvenTree/plugin/builtin/integration/mixins.py | 2 +- InvenTree/plugin/samples/integration/custom_panel_sample.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/InvenTree/build/views.py b/InvenTree/build/views.py index 6b44ae3dfc..c8ac4509b8 100644 --- a/InvenTree/build/views.py +++ b/InvenTree/build/views.py @@ -31,7 +31,7 @@ class BuildIndex(InvenTreeRoleMixin, ListView): def get_context_data(self, **kwargs): - context = super(self).get_context_data(**kwargs).copy() + context = super().get_context_data(**kwargs) context['BuildStatus'] = BuildStatus diff --git a/InvenTree/plugin/builtin/integration/mixins.py b/InvenTree/plugin/builtin/integration/mixins.py index d50a9ce729..b22efc9415 100644 --- a/InvenTree/plugin/builtin/integration/mixins.py +++ b/InvenTree/plugin/builtin/integration/mixins.py @@ -622,7 +622,7 @@ class PanelMixin: context['object'] = view.get_object() except AttributeError: pass - + return context def render_panels(self, view, request, context): diff --git a/InvenTree/plugin/samples/integration/custom_panel_sample.py b/InvenTree/plugin/samples/integration/custom_panel_sample.py index e0b84fe01a..73ca863576 100644 --- a/InvenTree/plugin/samples/integration/custom_panel_sample.py +++ b/InvenTree/plugin/samples/integration/custom_panel_sample.py @@ -64,7 +64,7 @@ class CustomPanelSample(PanelMixin, SettingsMixin, IntegrationPluginBase): 'icon': 'fas fa-boxes', 'content': 'Hello world!', 'description': 'A simple panel which renders hello world', - 'javascript': 'alert("Hello world");', + 'javascript': 'console.log("Hello world, from a custom panel!");', }) # This panel will *only* display on the PartDetail view