Opened 7 years ago

Closed 7 years ago

#6731 closed (fixed)

ManyToManyRawIdWidget broken after [7177]

Reported by: brosner Owned by: brosner
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: UI/UX:

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 Changed 7 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 7 years ago by brosner

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

comment:3 Changed 7 years ago by brosner

  • Resolution set to fixed
  • Status changed from assigned to closed

(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