From 26b7f089fde0e1f78b0dd8c32df72218f04633f0 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Wed, 22 Mar 2023 21:06:14 +0800 Subject: [PATCH] Guard tag --- api/s8_tags.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/s8_tags.py b/api/s8_tags.py index 8ae4a5d..18fc1cd 100644 --- a/api/s8_tags.py +++ b/api/s8_tags.py @@ -76,6 +76,8 @@ def set_tag_cmd(name: str, cs: ChangeSet) -> DbChangeSet: def set_tag(name: str, cs: ChangeSet) -> ChangeSet: + if 't_type' not in cs.operations[0] or 'id' not in cs.operations[0] or 'tag' not in cs.operations[0]: + return ChangeSet() return execute_command(name, set_tag_cmd(name, cs))