Skip to content

Commit

Permalink
FIX: Remove duplicated call to update_from_json from DataPoolEntry.
Browse files Browse the repository at this point in the history
  • Loading branch information
hhslepicka committed Oct 17, 2023
1 parent 92ae0b4 commit 30781d0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion botcity/maestro/datapool/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ def _verify_state(self, state: str):
if self.state is None:
return

if self.state == state:
return

if self.state == StateEnum.PENDING:
states = [StateEnum.PROCESSING]
if state not in [StateEnum.PROCESSING]:
Expand All @@ -132,7 +135,6 @@ def save(self) -> 'DataPoolEntry':
data = self.json_to_update()
with requests.post(url, data=data, headers=self.maestro._headers(), timeout=self.maestro.timeout) as req:
if req.ok:
self.update_from_json(payload=req.content)
return self.update_from_json(req.content)
req.raise_for_status()

Expand Down

0 comments on commit 30781d0

Please sign in to comment.