diff --git a/prime_backup/db/session.py b/prime_backup/db/session.py index 480a42b..8cd6fc4 100644 --- a/prime_backup/db/session.py +++ b/prime_backup/db/session.py @@ -237,7 +237,7 @@ def get_file_by_blob_hashes(self, hashes: List[str], *, limit: Optional[int] = N if limit is not None: st = st.limit(max(0, limit - len(result))) result.extend(self.session.execute(st).scalars().all()) - if len(result) >= limit: + if limit is not None and len(result) >= limit: break return result