admin: Fix bad names in update choices

This commit is contained in:
nemunaire 2020-01-28 10:49:12 +01:00
commit f4c74f57d6
3 changed files with 6 additions and 3 deletions

View file

@ -59,7 +59,7 @@ func (f FlagKey) AddChoice(c FlagChoice) (FlagChoice, error) {
// Update applies modifications back to the database.
func (c FlagChoice) Update() (int64, error) {
if res, err := DBExec("UPDATE flag_choices SET id_flag = ?, label = ?, value = ? WHERE id_choice = ?", c.IdFlag, c.Label, c.Value, c.Id); err != nil {
if res, err := DBExec("UPDATE flag_choices SET id_flag = ?, label = ?, response = ? WHERE id_choice = ?", c.IdFlag, c.Label, c.Value, c.Id); err != nil {
return 0, err
} else if nb, err := res.RowsAffected(); err != nil {
return 0, err