Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 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
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: UI/UX:

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@…> 8 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)

Changed 8 years ago by Tom Tobin <korpios@…>

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

comment:1 Changed 8 years ago by adrian

  • Resolution set to invalid
  • Status changed from new to closed

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

comment:2 Changed 7 years ago by korpios

  • Reporter changed from Tom Tobin <korpios@…> to Tom Tobin <korpios@…>

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.