Skip to content

Commit

Permalink
fix status
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcsaposs-canonical committed Oct 9, 2024
1 parent 9e85b09 commit c3b2ec0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/abstract_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ def _determine_unit_status(self, *, event) -> ops.StatusBase:
return self.refresh.unit_status_higher_priority
statuses = []
workload_status = self.get_workload(event=event).status
statuses.append(workload_status)
if not statuses:
if workload_status:
statuses.append(workload_status)
if not statuses and self.refresh.unit_status_lower_priority:
return self.refresh.unit_status_lower_priority
return self._prioritize_statuses(statuses)

Expand Down

0 comments on commit c3b2ec0

Please sign in to comment.