Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2262 closed defect (duplicate)

[patch] ManyToManyField with blank=True errors out when the field is blank

Reported by: rayners@… 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)

django-db-models-manipulators.diff (914 bytes ) - added by rayners@… 18 years ago.
Patch to check for blank ManyToManyField

Download all attachments as: .zip

Change History (3)

by rayners@…, 18 years ago

Patch to check for blank ManyToManyField

comment:1 by rayners@…, 18 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 Russell Keith-Magee, 18 years ago

Resolution: duplicate
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top