diff options
Diffstat (limited to 'horizon/static/framework/widgets/metadata/tree/tree.service.js')
-rw-r--r-- | horizon/static/framework/widgets/metadata/tree/tree.service.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/horizon/static/framework/widgets/metadata/tree/tree.service.js b/horizon/static/framework/widgets/metadata/tree/tree.service.js index c4d86d87e..1256985f5 100644 --- a/horizon/static/framework/widgets/metadata/tree/tree.service.js +++ b/horizon/static/framework/widgets/metadata/tree/tree.service.js @@ -56,6 +56,7 @@ this.default = null; this.type = 'string'; this.readonly = false; + this.required = true; this.operators = ['<in>']; angular.extend(this, json); this.operator = this.operators[0]; @@ -73,6 +74,11 @@ return; } + // if the existing property has empty string value, make the field not required + if (value === '') { + this.required = false; + } + switch (this.type) { case 'integer': this.value = parseInt(value, 10); |