coerce options and default values to strings
This commit is contained in:
parent
6f6d2192da
commit
fe3dad39b5
@ -29,8 +29,10 @@ class FormField:
|
||||
obj = getattr(obj, attr)
|
||||
self._default = obj
|
||||
else:
|
||||
self._default = default
|
||||
self.options: Optional[OptionsT] = options
|
||||
self._default = str(default)
|
||||
self.options: Optional[OptionsT] = None
|
||||
if options is not None:
|
||||
self.options = {str(k): str(v) for k, v in options.items()}
|
||||
self.required: bool = required
|
||||
|
||||
def __repr__(self) -> str:
|
||||
|
Loading…
Reference in New Issue
Block a user