Browse Source

models2: Fixed editing characters erasing all unedited data.

1.0
Gisle Aune 6 years ago
parent
commit
6dfbee7ff2
  1. 2
      models/characters/edit.go

2
models/characters/edit.go

@ -23,7 +23,7 @@ func Edit(character models.Character, name, shortName, description *string) (mod
changes["description"] = *description
}
err := collection.UpdateId(character.ID, changes)
err := collection.UpdateId(character.ID, bson.M{"$set": changes})
if err != nil {
return models.Character{}, err
}

Loading…
Cancel
Save