Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
production
building-knowledge-centre
building-dao
Commits
11ac19f0
Commit
11ac19f0
authored
Sep 24, 2020
by
unknown
Browse files
delegate update of status history to BKC API
parent
382cc095
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
building_dao/building_generic.py
building_dao/building_generic.py
+3
-11
No files found.
building_dao/building_generic.py
View file @
11ac19f0
...
...
@@ -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
):
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment