diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 26303a6549..ca291632b8 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={}): + def renderJsonResponse(self, request, form=None, data={}, context=None): """ Render a JSON response based on specific class context. Args: @@ -106,6 +106,9 @@ 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 947f3f6dc1..0f5696e816 100644 --- a/InvenTree/build/serializers.py +++ b/InvenTree/build/serializers.py @@ -28,6 +28,7 @@ class BuildSerializer(InvenTreeModelSerializer): 'completion_date', 'part', 'quantity', + 'is_active', 'status', 'status_text', 'notes'] @@ -37,6 +38,7 @@ class BuildSerializer(InvenTreeModelSerializer): 'creation_date', 'completion_data', 'status_text', + 'is_active', ]