On Jul 24, 3:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I think i stumbled over a bug. And i wanted to know if this a known
> issue or not..a search here and in the bug db revealed nothing.
>
> Calling full_clean in forms.py with a ModelChoiceField results in an
> sql error because it isn't checking if the field is of this type
> before using its value in the sql statement. The sql will fail with
> "Error binding parameter 0 - probably unsupported type"
>
> Has anyone seen this before?

Actually, I'd like to revisit this. I believe the bug is in widgets.py
and the fact that the Select widget, when used for a ForeignKey, will
return incorrect data(the model instance as opposed to actual value).

I faced this issue trying to get django-rest-interface to work with
newforms, and so the serializer is returning the correct model, but
when getting the form for this model and trying to validate it, it
will cause this problem.

I think the fix is simple enough, if i understand this correctly. Any
input?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to