Use QuerySets for search backend API instead of pks

This commit is contained in:
JDC
2020-11-19 18:19:33 -05:00
committed by Nick Sweeting
parent f383648ffc
commit 823df34080
3 changed files with 16 additions and 9 deletions

View File

@@ -666,7 +666,7 @@ def remove(filter_str: Optional[str]=None,
to_remove = snapshots.count()
remove_from_sql_main_index(snapshots=snapshots, out_dir=out_dir)
flush_search_index(snapshot_ids=(str(pk) for pk in snapshots.values_list('pk',flat=True)))
flush_search_index(snapshots=snapshots)
all_snapshots = load_main_index(out_dir=out_dir)
log_removal_finished(all_snapshots.count(), to_remove)