Merge pull request #207 from eReuse/change/#2825-tags-only-computers
fix change #2825, tags only for Computers
This commit is contained in:
commit
0a4b77f48a
|
@ -1206,6 +1206,7 @@ def create_code_tag(mapper, connection, device):
|
||||||
this tag is the same of devicehub_id.
|
this tag is the same of devicehub_id.
|
||||||
"""
|
"""
|
||||||
from ereuse_devicehub.resources.tag.model import Tag
|
from ereuse_devicehub.resources.tag.model import Tag
|
||||||
|
if isinstance(device, Computer):
|
||||||
tag = Tag(device_id=device.id, id=device.devicehub_id)
|
tag = Tag(device_id=device.id, id=device.devicehub_id)
|
||||||
db.session.add(tag)
|
db.session.add(tag)
|
||||||
|
|
||||||
|
|
Reference in New Issue