From 2aaa79e8b4f134e8ed8ad181751cb9877fb71d9a Mon Sep 17 00:00:00 2001 From: Xavier Bustamante Talavera Date: Sun, 14 Oct 2018 22:31:32 +0200 Subject: [PATCH] Fix one tag id per organization --- ereuse_devicehub/resources/tag/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ereuse_devicehub/resources/tag/model.py b/ereuse_devicehub/resources/tag/model.py index 465e073d..1ef2a530 100644 --- a/ereuse_devicehub/resources/tag/model.py +++ b/ereuse_devicehub/resources/tag/model.py @@ -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: