Commit 5a11ae71 authored by unknown's avatar unknown
Browse files

update update_status_history

parent 07649680
......@@ -131,9 +131,13 @@ class BuildingGeneric:
Note: the retries for conflict error are managed within BKC API
Do not update history if the status is already in there
"""
if status not in self._building["operation_history"]:
payload = {"new_entry": status}
url = "/".join([self.settings.base_url, self._uid, "history"])
if self._building["operation_history"] is None:
return self._req_with_retries(method="put", url=url, json=payload, **kwargs)
elif status not in self._building["operation_history"]:
return self._req_with_retries(method="put", url=url, json=payload, **kwargs)
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