Use service model for history

Rather than have the view layer interact directly with the API client.
This will let us add extra transformation in the model layer at some
point.
This commit is contained in:
Chris Hill-Scott
2019-10-18 09:52:41 +01:00
parent ae2db8d2ec
commit 7c2ecfa094
2 changed files with 8 additions and 6 deletions

View File

@@ -631,3 +631,7 @@ class Service(JSONModel):
):
if test:
yield BASE + '_incomplete' + tag
@cached_property
def history(self):
return service_api_client.get_service_history(self.id)['data']