From 18de4676dcdf2dc294423148c32d07e1803187ce Mon Sep 17 00:00:00 2001
From: Oliver Walters <oliver.henry.walters@gmail.com>
Date: Fri, 15 Apr 2022 19:22:06 +1000
Subject: [PATCH] Explicitly mark "parent" field in PartCategory and
 StockLocation as not required in API form fields

---
 InvenTree/templates/js/translated/part.js  | 1 +
 InvenTree/templates/js/translated/stock.js | 1 +
 2 files changed, 2 insertions(+)

diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js
index b0a88b2629..1a8e728040 100644
--- a/InvenTree/templates/js/translated/part.js
+++ b/InvenTree/templates/js/translated/part.js
@@ -293,6 +293,7 @@ function categoryFields() {
     return {
         parent: {
             help_text: '{% trans "Parent part category" %}',
+            required: false,
         },
         name: {},
         description: {},
diff --git a/InvenTree/templates/js/translated/stock.js b/InvenTree/templates/js/translated/stock.js
index 6c448107fc..9f9400c924 100644
--- a/InvenTree/templates/js/translated/stock.js
+++ b/InvenTree/templates/js/translated/stock.js
@@ -107,6 +107,7 @@ function stockLocationFields(options={}) {
     var fields = {
         parent: {
             help_text: '{% trans "Parent stock location" %}',
+            required: false,
         },
         name: {},
         description: {},