Selaa lähdekoodia

fix: multiuser duplicate tag issue

Timothy J. Baek 1 vuosi sitten
vanhempi
commit
fe3291acb5
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      backend/apps/web/models/tags.py

+ 3 - 1
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(