Skip to content

Commit

Permalink
Merge pull request #881 from materialsproject/bugfix/aggregation_sort…
Browse files Browse the repository at this point in the history
…_stage

Ensure sort stage is after match in agg pipeline
  • Loading branch information
Jason Munro authored Nov 7, 2023
2 parents f94e376 + 430512a commit ec788d5
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/maggma/api/resource/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ def generate_query_pipeline(query: dict, store: Store):
projection_dict.update({p: 1 for p in query["properties"]})

if sorting:
pipeline.append({"$project": {**projection_dict, store.key: 1}})
pipeline.append(sort_dict)

pipeline.append({"$project": projection_dict})
Expand Down

0 comments on commit ec788d5

Please sign in to comment.