dominno / django-moderation

django-moderation is reusable application for Django framework, that allows to moderate any model objects.
BSD 3-Clause "New" or "Revised" License
269 stars 90 forks source link

Moderate Proxy Models #67

Closed mlavin closed 12 years ago

mlavin commented 12 years ago

SerializedObjectField._serialize was raising an AttributeError when serializing a proxy model because the _meta.parents dictionary contains a None value since there is no field pointing to the parent. I've added tests to demonstrate the problem along with the fix. There is still a problem with serializing proxy models on Django versions prior to 1.4 due to https://code.djangoproject.com/ticket/17717. These tests are marked to be skipped on earlier versions. The test skipping introduces a new test dependency of unittest2.