Skip to content

Commit

Permalink
Do not raise if media base dir does not exist (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMStraub authored Dec 28, 2024
1 parent 867f444 commit a378a43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gramps_webapi/api/media.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def get_media_size(self, db_handle: Optional[DbReadBase] = None) -> int:
if not db_handle:
db_handle = get_db_handle()
if not os.path.isdir(self.base_dir):
raise ValueError(f"Directory {self.base_dir} does not exist")
return 0
size = 0
paths_seen = set()
for obj in db_handle.iter_media():
Expand Down

0 comments on commit a378a43

Please sign in to comment.