Code

Opened 4 years ago

Closed 3 years ago

#12188 closed Bug (wontfix)

Nullable numeric and date fields cause ValueError and ValidationError respectively in databrowse

Reported by: skyl Owned by: nobody
Component: contrib.databrowse Version: 1.1
Severity: Normal Keywords: databrowse null ValueError ValidationError
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have gender as a SmallPositiveIntegerField. Databrowse then allows "None" as a choice to filter by you can see here:

http://boss.oswco.net/databrowse/teller/employee/fields/gender/

ValueError: invalid literal for int() with base 10: 'None'

Likewise, nullable datefields generate a 'None' choice:

http://boss.oswco.net/databrowse/teller/employee/fields/birth_date/

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.

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 3 years ago by mattmcc

  • Severity set to Normal
  • Type set to Bug

comment:3 Changed 3 years ago by ptone

  • Easy pickings unset
  • Resolution set to wontfix
  • Status changed from new to closed
  • UI/UX unset

Databrowse is now deprecated, see #16907

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.