Commit 11ac19f0 authored by unknown's avatar unknown
Browse files

delegate update of status history to BKC API

parent 382cc095
......@@ -73,17 +73,9 @@ class BuildingGeneric:
Update the history.
Note: the retries for conflict error are managed within BKC API
"""
if self._building.get("operation_history") is None:
operation_history = [status] # Init the history if did not already exist
else:
operation_history = [*self._building.get("operation_history"), status]
payload = {
"operation_history": operation_history
}
self._req("put", "/".join([self.settings.base_url, self._uid]), json={**payload})
payload = {"operation_history": status}
url = "/".join([self.settings.base_url, self._uid, "history"])
return self._req(method="put", url=url, json=payload)
def register_error_for_building(self, error_code: str):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment