Revised the strip_form() utility to remove the empty input in the Mia core application.
This commit is contained in:
parent
0f8f2b7838
commit
fe8dae191e
@ -49,8 +49,10 @@ def strip_form(form):
|
|||||||
Args:
|
Args:
|
||||||
form (dict[str]): The form.
|
form (dict[str]): The form.
|
||||||
"""
|
"""
|
||||||
for key in form.keys():
|
for key in list(form.keys()):
|
||||||
form[key] = form[key].strip()
|
form[key] = form[key].strip()
|
||||||
|
if form[key] == "":
|
||||||
|
del form[key]
|
||||||
|
|
||||||
|
|
||||||
class Language:
|
class Language:
|
||||||
|
Loading…
Reference in New Issue
Block a user