Fix inconsistency with settings storage
This commit is contained in:
parent
dde368f733
commit
a9d1ccde38
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ func (m *Model) LoadByName(name string) error {
|
||||||
// Save will save this model to the DB
|
// Save will save this model to the DB
|
||||||
func (m *Model) Save() error {
|
func (m *Model) Save() error {
|
||||||
// ensure name is trimmed of whitespace
|
// ensure name is trimmed of whitespace
|
||||||
m.Name = strings.TrimSpace(m.Name)
|
m.Name = strings.ToLower(strings.TrimSpace(m.Name))
|
||||||
|
|
||||||
db := database.GetDB()
|
db := database.GetDB()
|
||||||
if result := db.Save(m); result.Error != nil {
|
if result := db.Save(m); result.Error != nil {
|
||||||
|
|
Loading…
Reference in a new issue