bugfix: defined owner_id in fixture tag_id

This commit is contained in:
Cayo Puigdefabregas 2020-07-22 18:40:27 +02:00
parent dc24599075
commit 46b985e222

View file

@ -125,7 +125,8 @@ def file(name: str) -> dict:
def tag_id(app: Devicehub) -> str:
"""Creates a tag and returns its id."""
with app.app_context():
t = Tag(id='foo')
user = User.query.one()
t = Tag(id='foo', owner_id=user.id)
db.session.add(t)
db.session.commit()
return t.id