mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-28 17:07:53 +01:00
Trim whitespace from names of objects on save
This commit is contained in:
1 parent
6d0bf1c68b
commit
8033d052fe
3 files changed
+10
No files matched your search
@@ -100,6 +100,9 @@ func (m *Model) Save() error {
|
||||
|
||||
m.setDefaultStatus()
|
||||
|
||||
// ensure name is trimmed of whitespace
|
||||
m.Name = strings.TrimSpace(m.Name)
|
||||
|
||||
if m.ID == 0 {
|
||||
m.ID, err = Create(m)
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user