Opened 16 years ago

Closed 16 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

Description

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 by Brian Rosner, 16 years ago

Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Brian Rosner, 16 years ago

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

comment:3 by Brian Rosner, 16 years ago

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