mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix) Pattern and empty string
This commit is contained in:
parent
3efa2fe751
commit
1b47859d37
1 changed files with 1 additions and 1 deletions
|
@ -526,7 +526,7 @@ class Question(object):
|
||||||
raise YunohostValidationError("app_argument_required", name=self.name)
|
raise YunohostValidationError("app_argument_required", name=self.name)
|
||||||
|
|
||||||
# we have an answer, do some post checks
|
# we have an answer, do some post checks
|
||||||
if self.value is not None:
|
if self.value not in [None, ""]:
|
||||||
if self.choices and self.value not in self.choices:
|
if self.choices and self.value not in self.choices:
|
||||||
self._raise_invalid_answer()
|
self._raise_invalid_answer()
|
||||||
if self.pattern and not re.match(self.pattern["regexp"], str(self.value)):
|
if self.pattern and not re.match(self.pattern["regexp"], str(self.value)):
|
||||||
|
|
Loading…
Add table
Reference in a new issue