Skip to content

Commit

Permalink
version -> versions
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Mar 3, 2024
1 parent 3b9e6f2 commit 8ba7b28
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backoffice/remote_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,10 @@ def publish(self) -> PublishedVersion:
return ret

def _set_status(self, value: StagedVersionStatus):
version = self.get_versions()
details = version.staged.setdefault(self.nr, StagedVersionDetails(status=value))
versions = self.get_versions()
details = versions.staged.setdefault(
self.nr, StagedVersionDetails(status=value)
)
if value.step < details.status.step:
logger.error("Cannot proceed from {} to {}", details.status, value)
return
Expand All @@ -296,7 +298,7 @@ def _set_status(self, value: StagedVersionStatus):
logger.warning("Proceeding from {} to {}", details.status, value)

details.status = value
self._extend_json(version)
self._extend_json(versions)


@dataclass
Expand Down

0 comments on commit 8ba7b28

Please sign in to comment.