cmd/ursrv: Skip the duplicate complaints with new index name

This commit is contained in:
Jakob Borg 2020-06-23 14:18:52 +02:00
parent 689cf2a5ee
commit 78d294f78c

View File

@ -343,7 +343,7 @@ func newDataHandler(db *sql.DB, w http.ResponseWriter, r *http.Request) {
}
if err := insertReport(db, rep); err != nil {
if err.Error() == `pq: duplicate key value violates unique constraint "uniqueidindex"` {
if err.Error() == `pq: duplicate key value violates unique constraint "uniqueidjsonindex"` {
// We already have a report today for the same unique ID; drop
// this one without complaining.
return