Opened 12 years ago

Closed 12 years ago

#6731 closed (fixed)

ManyToManyRawIdWidget broken after [7177]

Reported by: Brian Rosner Owned by: Brian Rosner
Component: Uncategorized Version: newforms-admin
Severity: Keywords: nfa-blocker
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The ManyToManyRawIdWidget is broken since it subclasses ForeignKeyRawIdWidget and it will do a query to grab its object for display of the object. Since the value for a m2m is a list this will throw a database level exception (at least with PostgreSQL it does). The simple fix is to just ignore the value when it is a list. Noting this problem in this ticket so I don't forget.

Change History (3)

comment:1 Changed 12 years ago by Brian Rosner

Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 Changed 12 years ago by Brian Rosner

I jumped to a conclusion. The value in the ManyToManyRawIdWidget is not a list, but a comma separated string ;)

comment:3 Changed 12 years ago by Brian Rosner

Resolution: fixed
Status: assignedclosed

(In [7262]) newforms-admin: Fixed #6731 -- ManyToManyRawIdWidget? no longer allows wrong data being sent to the database. Admin widgets tests are now in regressiontests.

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