Skip to content

Commit

Permalink
DB: fix return value of get_latest_snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidB137 committed Sep 19, 2023
1 parent f849110 commit 4f19d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dp3/database/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def get_latest_snapshots(
snapshot_col = self._snapshots_col_name(etype)
latest_snapshot = self._db[snapshot_col].find_one({}, sort=[("_id", -1)])
if latest_snapshot is None:
return self._db[snapshot_col].find()
return self._db[snapshot_col].find(), self._db[snapshot_col].count_documents({})

latest_snapshot_date = latest_snapshot["_time_created"]
query = {"_time_created": latest_snapshot_date}
Expand Down

0 comments on commit 4f19d17

Please sign in to comment.