Fix inconsistency with settings storage

This commit is contained in:
Jamie Curnow 2023-05-29 14:45:00 +10:00
parent dde368f733
commit a9d1ccde38
No known key found for this signature in database
GPG Key ID: FFBB624C43388E9E

View File

@ -39,7 +39,7 @@ func (m *Model) LoadByName(name string) error {
// Save will save this model to the DB
func (m *Model) Save() error {
// ensure name is trimmed of whitespace
m.Name = strings.TrimSpace(m.Name)
m.Name = strings.ToLower(strings.TrimSpace(m.Name))
db := database.GetDB()
if result := db.Save(m); result.Error != nil {