From 91ff15a635a0e8a86d0392a9acaa55d81a24d5dc Mon Sep 17 00:00:00 2001 From: AllForNothing Date: Wed, 2 Aug 2023 15:12:58 +0800 Subject: [PATCH] Convert the string "0" to number 0 1. Fixes #19046 Signed-off-by: AllForNothing --- .../tag-retention/add-rule/add-rule.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/portal/src/app/base/project/tag-feature-integration/tag-retention/add-rule/add-rule.component.ts b/src/portal/src/app/base/project/tag-feature-integration/tag-retention/add-rule/add-rule.component.ts index e4299c191eb..c3aaeb319b3 100644 --- a/src/portal/src/app/base/project/tag-feature-integration/tag-retention/add-rule/add-rule.component.ts +++ b/src/portal/src/app/base/project/tag-feature-integration/tag-retention/add-rule/add-rule.component.ts @@ -215,6 +215,10 @@ export class AddRuleComponent { } add() { + // convert string "0" to number 0 + if (this.rule.params[this.template] === '0') { + this.rule.params[this.template] = 0; + } // remove whitespaces this.rule.scope_selectors.repository[0].pattern = this.rule.scope_selectors.repository[0].pattern.replace(/\s+/g, '');