diff --git a/ui/src/components/executions/SetLabels.vue b/ui/src/components/executions/SetLabels.vue index 41255574682..612e697e5f9 100644 --- a/ui/src/components/executions/SetLabels.vue +++ b/ui/src/components/executions/SetLabels.vue @@ -76,7 +76,8 @@ methods: { setLabels() { const filtered = filterLabels(this.executionLabels) - + console.log("executionLabels", this.executionLabels) + console.log("filtered", filtered) if(filtered.error) { this.$toast().error(this.$t("wrong labels")) return; diff --git a/ui/src/components/executions/utils.ts b/ui/src/components/executions/utils.ts index 5d7d80e1ac9..fe28e47e816 100644 --- a/ui/src/components/executions/utils.ts +++ b/ui/src/components/executions/utils.ts @@ -9,6 +9,6 @@ interface FilterResult { } export const filterLabels = (labels: Label[]): FilterResult => { - const invalid = labels.some(label => label.key === null || label.value === null); + const invalid = labels.some(label => label.key === null || label.value === null || label.key === "" || label.value === ""); return invalid ? {labels, error: true} : {labels}; }; diff --git a/webserver/src/main/java/io/kestra/webserver/controllers/api/ExecutionController.java b/webserver/src/main/java/io/kestra/webserver/controllers/api/ExecutionController.java index f9ed05269fa..a83a3d5ebb1 100644 --- a/webserver/src/main/java/io/kestra/webserver/controllers/api/ExecutionController.java +++ b/webserver/src/main/java/io/kestra/webserver/controllers/api/ExecutionController.java @@ -1594,7 +1594,7 @@ private Execution setLabels(Execution execution, List