Skip to content

Commit

Permalink
Fixed DbSession.get_file_by_blob_hashes limit handling
Browse files Browse the repository at this point in the history
affected compress method / hash method migration
  • Loading branch information
Fallen-Breath committed Sep 11, 2024
1 parent 6492c8f commit 88f9a42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prime_backup/db/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 88f9a42

Please sign in to comment.