Fix one tag id per organization

This commit is contained in:
Xavier Bustamante Talavera 2018-10-14 22:31:32 +02:00
parent 9cffa92125
commit 2aaa79e8b4

View file

@ -75,8 +75,8 @@ class Tag(Thing):
return url
__table_args__ = (
UniqueConstraint(device_id, org_id, name='one_tag_per_org'),
UniqueConstraint(secondary, org_id, name='one_secondary_per_org')
UniqueConstraint(id, org_id, name='one tag id per organization'),
UniqueConstraint(secondary, org_id, name='one secondary tag per organization')
)
def __repr__(self) -> str: