From fe3291acb5416c1ef3f67bc037fe8803e14a69a7 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 20 Apr 2024 21:12:59 -0500 Subject: [PATCH] fix: multiuser duplicate tag issue --- backend/apps/web/models/tags.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/apps/web/models/tags.py b/backend/apps/web/models/tags.py index 196551b7b..409a788ab 100644 --- a/backend/apps/web/models/tags.py +++ b/backend/apps/web/models/tags.py @@ -136,7 +136,9 @@ class TagTable: return [ TagModel(**model_to_dict(tag)) - for tag in Tag.select().where(Tag.name.in_(tag_names)) + for tag in Tag.select() + .where(Tag.user_id == user_id) + .where(Tag.name.in_(tag_names)) ] def get_tags_by_chat_id_and_user_id(