mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 17:35:27 +08:00
handle new name can be null
This commit is contained in:
parent
f069d2f083
commit
fbf242f6c6
1 changed files with 2 additions and 0 deletions
|
@ -293,6 +293,8 @@ def update_alias(alias_id):
|
|||
if "name" in data:
|
||||
# to make sure alias name doesn't contain linebreak
|
||||
new_name = data.get("name").replace("\n", "")
|
||||
if new_name:
|
||||
new_name = new_name.replace("\n", "")
|
||||
alias.name = new_name
|
||||
changed = True
|
||||
|
||||
|
|
Loading…
Reference in a new issue