mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-18 18:16:26 +00:00
Trim whitespace from names of objects on save
This commit is contained in:
@ -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