diff --git a/ereuse_devicehub/resources/event/models.pyi b/ereuse_devicehub/resources/event/models.pyi index a3ca84be..8730fb31 100644 --- a/ereuse_devicehub/resources/event/models.pyi +++ b/ereuse_devicehub/resources/event/models.pyi @@ -31,7 +31,6 @@ class Event(Thing): error = ... # type: Column incidence = ... # type: Column description = ... # type: Column - finalized = ... # type: Column snapshot_id = ... # type: Column snapshot = ... # type: relationship author_id = ... # type: Column @@ -79,6 +78,7 @@ class EventWithOneDevice(Event): class EventWithMultipleDevices(Event): + devices = ... # type: relationship def __init__(self, id=None, name=None, incidence=None, closed=None, error=None, description=None, start_time=None, end_time=None, snapshot=None, agent=None, diff --git a/ereuse_devicehub/resources/lot/views.py b/ereuse_devicehub/resources/lot/views.py index 13bbe80c..64bc0424 100644 --- a/ereuse_devicehub/resources/lot/views.py +++ b/ereuse_devicehub/resources/lot/views.py @@ -58,7 +58,7 @@ class LotView(View): lot = Lot.query.filter_by(id=lot_id).one() node = { 'id': lot_id, - 'title': lot.name, + 'name': lot.name, 'url': lot.url.to_text(), 'closed': lot.closed, 'updated': lot.updated, diff --git a/tests/test_lot.py b/tests/test_lot.py index a9a11d85..a5d93b04 100644 --- a/tests/test_lot.py +++ b/tests/test_lot.py @@ -223,9 +223,9 @@ def test_post_add_children_view(user: UserClient): lots = user.get(res=Lot)[0]['items'] assert len(lots) == 1 - assert lots[0]['title'] == 'Parent' + assert lots[0]['name'] == 'Parent' assert len(lots[0]['nodes']) == 1 - assert lots[0]['nodes'][0]['title'] == 'Child' + assert lots[0]['nodes'][0]['name'] == 'Child' def test_lot_post_add_remove_device_view(app: Devicehub, user: UserClient):