fix change #2825, tags only for Computers

This commit is contained in:
Cayo Puigdefabregas 2022-03-03 10:43:34 +01:00
parent 919e4f4e48
commit d25c9faf25
1 changed files with 3 additions and 2 deletions

View File

@ -1206,6 +1206,7 @@ def create_code_tag(mapper, connection, device):
this tag is the same of devicehub_id.
"""
from ereuse_devicehub.resources.tag.model import Tag
if isinstance(device, Computer):
tag = Tag(device_id=device.id, id=device.devicehub_id)
db.session.add(tag)