Skip to content

Commit 574f94c

Browse files
committed
Avoid None values [..., None, ...] in the snapshots key's value with list_versions. This may happen if during the runtime of list_version a new snapshot is created.
1 parent 4365ac8 commit 574f94c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arctic/store/version_store.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def list_versions(self, symbol=None, snapshot=None, latest_only=False):
260260
'deleted': meta.get('deleted', False) if meta else False,
261261
# We return offset-aware datetimes in Local Time.
262262
'date': ms_to_datetime(datetime_to_ms(version['_id'].generation_time)),
263-
'snapshots': [snapshots.get(s) for s in version.get('parent', [])]})
263+
'snapshots': [snapshots[s] for s in version.get('parent', []) if s in snapshots]})
264264
return versions
265265

266266
def _find_snapshots(self, parent_ids):

0 commit comments

Comments
 (0)