Django

Code

Ticket #6731 (closed: fixed)

Opened 4 months ago

Last modified 4 months ago

ManyToManyRawIdWidget broken after [7177]

Reported by: brosner Assigned to: brosner
Milestone: Component: Uncategorized
Version: newforms-admin Keywords: nfa-blocker
Cc: Triage Stage: Accepted
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

03/06/08 12:45:18 changed by brosner

  • status changed from new to assigned.
  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

03/06/08 12:52:46 changed by brosner

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

03/17/08 10:48:32 changed by brosner

  • status changed from assigned to closed.
  • resolution set to fixed.

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


Add/Change #6731 (ManyToManyRawIdWidget broken after [7177])




Change Properties
Action