Nullable numeric and date fields cause ValueError and ValidationError respectively in databrowse
|Reported by:||skyl||Owned by:||nobody|
|Severity:||Normal||Keywords:||databrowse null ValueError ValidationError|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I have gender as a SmallPositiveIntegerField. Databrowse then allows "None" as a choice to filter by you can see here:
ValueError: invalid literal for int() with base 10: 'None'
Likewise, nullable datefields generate a 'None' choice:
Which results in an error:
ValidationError: Enter a valid date in YYYY-MM-DD format.
Maybe there is an easy convention or workaround for dealing with these cases. Sorry if this has already been reported.
Change History (3)
comment:1 Changed 5 years ago by russellm
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted