Skip to content

Commit

Permalink
Forced photometry update pipeline - missing match stage (#264)
Browse files Browse the repository at this point in the history
added missing match stage
  • Loading branch information
Theodlz authored Dec 13, 2023
1 parent 7f29ad0 commit dc1a9bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kowalski/alert_brokers/alert_broker_ztf.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ def update_fp_hists(self, alert, formatted_fp_hists):
self.verbose > 1,
):
update_pipeline = [
# 0. match the document
{"$match": {"_id": alert["objectId"]}},
# 1. concat the new fp_hists with the existing ones
{
"$project": {
Expand Down Expand Up @@ -617,6 +619,7 @@ def update_fp_hists(self, alert, formatted_fp_hists):
self.mongo.db[self.collection_alerts_aux]
.aggregate(
update_pipeline,
allowDiskUse=True,
)
.next()
.get("fp_hists", [])
Expand Down

0 comments on commit dc1a9bd

Please sign in to comment.