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.
SerializedObjectField._serialize
was raising anAttributeError
when serializing a proxy model because the_meta.parents
dictionary contains aNone
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 ofunittest2
.