Skip to content

Commit

Permalink
fix delete query
Browse files Browse the repository at this point in the history
  • Loading branch information
mbthornton-lbl committed Feb 23, 2024
1 parent d69a822 commit 4be3504
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nmdc_automation/re_iding/scripts/re_id_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def delete_old_records(ctx, old_records_file):
annotation_ids.append(item["id"])
delete_query = {
"delete": set_name,
"deletes": [{"q": {"id": {"$in": delete_ids}}, "limit": len(delete_ids)}],
"deletes": [{"q": {"$id": {"$in": delete_ids}}, "limit": 0}],
}
try:
logging.info(f"Deleting {set_name} records: {delete_ids}")
Expand All @@ -529,7 +529,7 @@ def delete_old_records(ctx, old_records_file):
# delete functional annotation agg records
delete_annotation_query = {
"delete": "functional_annotation_agg",
"deletes": [{"q": {"metagenome_annotation_id": {"$in": annotation_ids}}, "limit": len(annotation_ids)}],
"deletes": [{"q": {"metagenome_annotation_id": {"$in": annotation_ids}}, "limit": 0}],
}
try:
logging.info(f"Deleting functional annotation agg records: {annotation_ids}")
Expand Down

0 comments on commit 4be3504

Please sign in to comment.