From 29f7b1a32bd3ce8e9c38f283f7a80a9be3e6ef92 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 1 May 2019 22:52:33 +1000 Subject: [PATCH] Revert "More intelligent passing of context data in AjaxView" This reverts commit fbb9a708f560f841fab50b811ea1b5a32cf20521. --- InvenTree/InvenTree/views.py | 5 +---- InvenTree/build/serializers.py | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index ca291632b8..26303a6549 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -93,7 +93,7 @@ class AjaxMixin(object): """ return {} - def renderJsonResponse(self, request, form=None, data={}, context=None): + def renderJsonResponse(self, request, form=None, data={}, context={}): """ Render a JSON response based on specific class context. Args: @@ -106,9 +106,6 @@ class AjaxMixin(object): JSON response object """ - if not context: - context = self.get_context_data() - if form: context['form'] = form diff --git a/InvenTree/build/serializers.py b/InvenTree/build/serializers.py index 0f5696e816..947f3f6dc1 100644 --- a/InvenTree/build/serializers.py +++ b/InvenTree/build/serializers.py @@ -28,7 +28,6 @@ class BuildSerializer(InvenTreeModelSerializer): 'completion_date', 'part', 'quantity', - 'is_active', 'status', 'status_text', 'notes'] @@ -38,7 +37,6 @@ class BuildSerializer(InvenTreeModelSerializer): 'creation_date', 'completion_data', 'status_text', - 'is_active', ]