From 06b2a3959c756131aa1c6825274df01a14690fa4 Mon Sep 17 00:00:00 2001 From: Novice Date: Wed, 4 Jun 2025 13:33:57 +0800 Subject: [PATCH] fix: change the add tag logic --- api/services/tag_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/services/tag_service.py b/api/services/tag_service.py index 59d0a5d9c4..74c6150b44 100644 --- a/api/services/tag_service.py +++ b/api/services/tag_service.py @@ -75,7 +75,7 @@ class TagService: @staticmethod def save_tags(args: dict) -> Tag: - if TagService.get_tag_by_tag_name(args.get("type", ""), current_user.current_tenant_id, args.get("name", "")): + if TagService.get_tag_by_tag_name(args["type"], current_user.current_tenant_id, args["name"]): raise ValueError("Tag name already exists") tag = Tag( id=str(uuid.uuid4()),