Skip to content

Commit f02e1fe

Browse files
authored
fix: bump mongodb_backups (#349)
1 parent 448f7d4 commit f02e1fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/charms/mongodb/v1/mongodb_backups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
# Increment this PATCH version before using `charmcraft publish-lib` or reset
4343
# to 0 if you are raising the major API version
44-
LIBPATCH = 5
44+
LIBPATCH = 6
4545

4646
logger = logging.getLogger(__name__)
4747

@@ -800,7 +800,7 @@ def get_backup_error_status(self, backup_id: str) -> str:
800800
"""Get the error status for a provided backup."""
801801
pbm_status = self.charm.run_pbm_command(["status", "--out=json"])
802802
pbm_status = json.loads(pbm_status)
803-
backups = pbm_status["backups"].get("snapshot", [])
803+
backups = pbm_status["backups"].get("snapshot") or []
804804
for backup in backups:
805805
if backup_id == backup["name"]:
806806
return backup.get("error", "")

0 commit comments

Comments
 (0)