From f173b68a6aa5ecb9bcd37a2a82810108aaae86c7 Mon Sep 17 00:00:00 2001
From: Hartwig Hauschild <git@hauschild.it>
Date: Wed, 19 Oct 2022 16:50:32 +0200
Subject: [PATCH] Fix metadata update dialog

values that are NULL in the DB should not lead to being required

Change-Id: I065170921c9944410615358744bf6ca4a6380dc9
---
 horizon/static/framework/widgets/metadata/tree/tree.service.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/horizon/static/framework/widgets/metadata/tree/tree.service.js b/horizon/static/framework/widgets/metadata/tree/tree.service.js
index 1256985f5..205c683e4 100644
--- a/horizon/static/framework/widgets/metadata/tree/tree.service.js
+++ b/horizon/static/framework/widgets/metadata/tree/tree.service.js
@@ -71,6 +71,8 @@
     Property.prototype.setValue = function (value) {
       if (value === null) {
         this.value = this.type !== 'array' ? null : [];
+	// if value is null make the field not required
+	this.required=false;
         return;
       }
 
-- 
2.30.2

