1. Andy Mikhailenko
  2. eav-django
  3. Issues
Issue #6 new

Model with ManyToMany column referring to EAV object can not be edited in admin

created an issue

Consider the following code: {{{ class EAVtest(eav.models.BaseEntity): name = models.CharField(_("name"), unique=True, max_length=255)

class Referrer(models.Model): eavtests = models.ManyToManyField(EAVtest) }}}

This works fine, but you can not edit Referrer object in admin - you get an exception.

The root of the problem is that Django's ModelMultipleChoiceField.prepare_value tries to iterate eav object which leads to undesirable behavior.

Comments (0)

  1. Log in to comment