handle new name can be null
This commit is contained in:
parent
f069d2f083
commit
fbf242f6c6
|
@ -293,6 +293,8 @@ def update_alias(alias_id):
|
||||||
if "name" in data:
|
if "name" in data:
|
||||||
# to make sure alias name doesn't contain linebreak
|
# to make sure alias name doesn't contain linebreak
|
||||||
new_name = data.get("name").replace("\n", "")
|
new_name = data.get("name").replace("\n", "")
|
||||||
|
if new_name:
|
||||||
|
new_name = new_name.replace("\n", "")
|
||||||
alias.name = new_name
|
alias.name = new_name
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue