Skip to content

Commit

Permalink
fix: check for _upgrade existence
Browse files Browse the repository at this point in the history
  • Loading branch information
Gu1nness committed Sep 30, 2024
1 parent 517633f commit d7103e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/charms/mongodb/v0/upgrade_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Increment this PATCH version before using `charmcraft publish-lib` or reset
# to 0 if you are raising the major API version
LIBPATCH = 2
LIBPATCH = 3

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -692,7 +692,7 @@ def are_pre_upgrade_operations_config_server_successful(self):
# again automatically on refresh (just in case the user forgot to). Disabling the balancer
# can negatively impact the cluster, so we only disable it once the upgrade sequence has
# begun.
if self._upgrade.in_progress:
if self._upgrade and self._upgrade.in_progress:
try:
self.turn_off_and_wait_for_balancer()
except BalancerStillRunningError:
Expand Down

0 comments on commit d7103e9

Please sign in to comment.