Revised the strip_form() utility to remove the empty input in the Mia core application.

This commit is contained in:
依瑪貓 2020-08-02 09:44:08 +08:00
parent 0f8f2b7838
commit fe8dae191e

View File

@ -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: