Commit 07649680 authored by unknown's avatar unknown
Browse files

update status history if entry not already in there

parent 6f4c3f52
...@@ -129,10 +129,11 @@ class BuildingGeneric: ...@@ -129,10 +129,11 @@ class BuildingGeneric:
""" """
Update the history. Update the history.
Note: the retries for conflict error are managed within BKC API 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} payload = {"new_entry": status}
url = "/".join([self.settings.base_url, self._uid, "history"]) url = "/".join([self.settings.base_url, self._uid, "history"])
return self._req_with_retries(method="put", url=url, json=payload, **kwargs) return self._req_with_retries(method="put", url=url, json=payload, **kwargs)
def register_error_for_building(self, error_code: str): 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