Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix/create filter errors #285

Merged
merged 2 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Capture errors properly
  • Loading branch information
chadweimer committed Mar 2, 2021
commit 15b96b3421c14838ba3120da315760968dffc5d2
6 changes: 3 additions & 3 deletions db/user-postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ func (d *postgresUserDriver) createSearchFilterTx(filter *models.SavedSearchFilt
return err
}

d.SetSearchFilterFieldsTx(filter.ID, filter.Fields, tx)
err = d.SetSearchFilterFieldsTx(filter.ID, filter.Fields, tx)
if err != nil {
return err
}

d.SetSearchFilterStatesTx(filter.ID, filter.States, tx)
err = d.SetSearchFilterStatesTx(filter.ID, filter.States, tx)
if err != nil {
return err
}

d.SetSearchFilterTagsTx(filter.ID, filter.Tags, tx)
err = d.SetSearchFilterTagsTx(filter.ID, filter.Tags, tx)
if err != nil {
return err
}
Expand Down
12 changes: 6 additions & 6 deletions db/user-sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,17 @@ func (d *sqlUserDriver) createSearchFilterTx(filter *models.SavedSearchFilter, t
}
filter.ID, _ = res.LastInsertId()

d.SetSearchFilterFieldsTx(filter.ID, filter.Fields, tx)
err = d.SetSearchFilterFieldsTx(filter.ID, filter.Fields, tx)
if err != nil {
return err
}

d.SetSearchFilterStatesTx(filter.ID, filter.States, tx)
err = d.SetSearchFilterStatesTx(filter.ID, filter.States, tx)
if err != nil {
return err
}

d.SetSearchFilterTagsTx(filter.ID, filter.Tags, tx)
err = d.SetSearchFilterTagsTx(filter.ID, filter.Tags, tx)
if err != nil {
return err
}
Expand Down Expand Up @@ -337,17 +337,17 @@ func (d *sqlUserDriver) updateSearchFilterTx(filter *models.SavedSearchFilter, t
return err
}

d.SetSearchFilterFieldsTx(filter.ID, filter.Fields, tx)
err = d.SetSearchFilterFieldsTx(filter.ID, filter.Fields, tx)
if err != nil {
return err
}

d.SetSearchFilterStatesTx(filter.ID, filter.States, tx)
err = d.SetSearchFilterStatesTx(filter.ID, filter.States, tx)
if err != nil {
return err
}

d.SetSearchFilterTagsTx(filter.ID, filter.Tags, tx)
err = d.SetSearchFilterTagsTx(filter.ID, filter.Tags, tx)
if err != nil {
return err
}
Expand Down