Don't return an error when report doesn't exist

This commit is contained in:
Eli Ribble 2026-04-29 20:18:36 +00:00
parent da75aeecf2
commit 7e79308868
No known key found for this signature in database

View file

@ -26,7 +26,7 @@ func ByID(ctx context.Context, public_id string, is_public bool) (*types.PublicR
} }
log.Debug().Str("public_id", public_id).Int("len", len(reports)).Msg("querying for publicreport by ID") log.Debug().Str("public_id", public_id).Int("len", len(reports)).Msg("querying for publicreport by ID")
if len(reports) != 1 { if len(reports) != 1 {
return nil, fmt.Errorf("reports returned: %d", len(reports)) return nil, nil
} }
return reports[0], nil return reports[0], nil
} }