Fix retrieval of reports by ID

This commit is contained in:
Eli Ribble 2026-03-24 08:24:36 -07:00
parent 6f45325d9d
commit 0289bf5756
No known key found for this signature in database

View file

@ -72,7 +72,7 @@ func reportQueryToRows(ctx context.Context, org_id int32, query bob.BaseQuery[*d
func Reports(ctx context.Context, org_id int32, ids []int32) ([]*types.Report, error) {
query := reportQuery(org_id)
query.Apply(
sm.Where(psql.Quote("publicreport", "report", "reviewed").IsNull()),
sm.Where(psql.Quote("publicreport", "report", "id").EQ(psql.Any(ids))),
)
return reportQueryToRows(ctx, org_id, query)
}