#2262 closed defect (duplicate)
[patch] ManyToManyField with blank=True errors out when the field is blank
| Reported by: | Owned by: | Adrian Holovaty | |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | dev |
| 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
I have a ManyToManyField with blank=True in a model that is in being edited inline, and whenever I add a new item with a blank entry in that field, I would receive an error about missing set_fieldname.
So I threw together a quick patch and it is working for me currently. This is my first stab at working with Django, so the logic may be a bit off.
Attachments (1)
Change History (3)
by , 19 years ago
| Attachment: | django-db-models-manipulators.diff added |
|---|
comment:1 by , 19 years ago
| Summary: | ManyToManyField with blank does errors out when the field is blank → [patch] ManyToManyField with blank=True errors out when the field is blank |
|---|
comment:2 by , 19 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
This is a duplicate of #1816.
The actual problem isn't quite as described. The issue is that the set_fieldname method is a remnant of pre-magic removal. The blank=True is a red herring in this case.
Patch to check for blank ManyToManyField