Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#1353 closed defect (invalid)

[patch] Form fields should check a field's `null` option for setting `is_required`

Reported by: Tom Tobin <korpios@…> Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Form fields currently check a Field instance's blank attribute for setting the is_required parameter (used during form validation); the null attribute should be tested as well, or else certain non-string fields where null would apply rather than blank (e.g., DateTimeField) will not be allowed to save with a null value.

The attached patch adds a simple check for a Field instance's null attribute when setting is_required.

Attachments (1)

trunk-is_required_check_null.diff (728 bytes ) - added by Tom Tobin <korpios@…> 18 years ago.
Check a Field instance's null attribute when setting is_required (against r2306 of trunk)

Download all attachments as: .zip

Change History (3)

by Tom Tobin <korpios@…>, 18 years ago

Check a Field instance's null attribute when setting is_required (against r2306 of trunk)

comment:1 by Adrian Holovaty, 18 years ago

Resolution: invalid
Status: newclosed

The current behavior (checking black) is correct -- null purely specifies whether a field can be NULL in the database.

comment:2 by korpios, 17 years ago

Reporter: changed from Tom Tobin <korpios@…> to Tom Tobin <korpios@…>
Note: See TracTickets for help on using tickets.
Back to Top