Override django CharField

Bug #1214811 reported by matley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
Fix Released
Critical
matley

Bug Description

We have got some build failure (e.g. http://ci.openquake.org/job/master_oq-engine/476/) due to an unexpected behavior of the clean method of the django forms.CharField. Such fields are used to validate database text field (also when they are nullable).

When called with a None values it returns an empty string instead of None. See http://pastebin.ubuntu.com/6009507/

A suggested solution is to implement a NullTextField which can clean a None value by returning a None value.

Tags: validation
Revision history for this message
matley (matley) wrote :
Changed in oq-engine:
status: New → In Progress
matley (matley)
Changed in oq-engine:
status: In Progress → Fix Committed
Changed in oq-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.