#1353 closed defect (invalid)
[patch] Form fields should check a field's `null` option for setting `is_required`
| Reported by: | 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)
Change History (3)
by , 20 years ago
| Attachment: | trunk-is_required_check_null.diff added |
|---|
comment:1 by , 20 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
The current behavior (checking black) is correct -- null purely specifies whether a field can be NULL in the database.
comment:2 by , 18 years ago
| Reporter: | changed from to |
|---|
Check a
Fieldinstance'snullattribute when settingis_required(against r2306 of trunk)