Todd,

On 2/2/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
>
> I'm getting the following error when I put
>     class Meta:
>         unique_together = (('number', 'test'),)
> in an Answer model that refers to a Test model as a ForeignKey.
>
> Commenting out the Meta class clears up the problem, but it's a complete
> mystery to me. Any ideas?
>
> Todd
>
> AttributeError at /admin/GLMLapp/test/add/
> 'AddManipulator' object has no attribute 'isUniquenumber_test'
>           Request Method:
> GET
>             Request URL:
> http://127.0.0.1:8001/admin/GLMLapp/test/add/
>           Exception Type:
> AttributeError
>           Exception Value:
> 'AddManipulator' object has no
> attribute 'isUniquenumber_test'
>         Exception Location:
> /usr/lib/python2.4/site-packages/django/db/models/fields/__init__.py in 
> get_manipulator_fields, line 233
> Traceback (innermost last)
>

If your Answer.test FK field has the edit_inline=blah option the you
have been bitten by the issue described in #526, that ticket
is somwewhat confusing but it has test cases that reproduce
the problem.

A workaround is to put the FK first in Meta.unique_together:

    class Meta:
        unique_together = (('test', 'number'),)

in you case.

Regards,

-- 
 Ramiro Morales

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to