diff --git a/gramps_webapi/api/media.py b/gramps_webapi/api/media.py index 3a90b959..aacf8f83 100644 --- a/gramps_webapi/api/media.py +++ b/gramps_webapi/api/media.py @@ -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():