Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
Daniil Fajnberg | 6b241feda5 |
|
@ -61,7 +61,8 @@ class FormField:
|
|||
def valid_option(self, option: str) -> bool:
|
||||
return self.options is None or option in self.options.keys() or option in self.options.values()
|
||||
|
||||
def clean(self, value: str) -> str:
|
||||
def clean(self, value: Any) -> str:
|
||||
value = str(value)
|
||||
if self.options is None or value in self.options.keys():
|
||||
return value
|
||||
# Try to find an unambiguous match in the visible option texts:
|
||||
|
|
Loading…
Reference in New Issue