models2: Fixed editing characters erasing all unedited data.
the build failed

This commit is contained in:
2018-10-06 13:55:16 +02:00
parent 8a07c2ffdb
commit 6dfbee7ff2
+1 -1
View File
@@ -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
}