Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Feb 7, 2024
1 parent c70c189 commit ff42ca8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/database/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ func (d *Database) CreateOrUpdateURL(urlStr string, categoryCode string, country
func updateDatabaseMeasurementWithSummaryKeys(msmt *model.DatabaseMeasurement, sk model.MeasurementSummaryKeys) error {
skBytes, err := json.Marshal(sk)
if err != nil {
log.WithError(err).Error("failed to serialize summary")
return err
}
msmt.TestKeys = string(skBytes)
Expand All @@ -363,7 +364,7 @@ func updateDatabaseMeasurementWithSummaryKeys(msmt *model.DatabaseMeasurement, s
// AddTestKeys implements WritableDatabase.AddTestKeys
func (d *Database) AddTestKeys(msmt *model.DatabaseMeasurement, sk model.MeasurementSummaryKeys) error {
if err := updateDatabaseMeasurementWithSummaryKeys(msmt, sk); err != nil {
log.WithError(err).Error("failed to serialize summary")
// error message already printed
return err
}
err := d.sess.Collection("measurements").Find("measurement_id", msmt.ID).Update(msmt)
Expand Down

0 comments on commit ff42ca8

Please sign in to comment.