I believe it may be related to #3593. [See here](https://github.com/PersonalGenomesOrg/open-humans/blob/eb5a56af81209350398e0240aaa51ff0abc82afb/studies/american_gut/models.py#L53) for a model that causes this error when serialized. I think the issue affects models that have a primary key that's not called `id`. (In this model `value` is the primary key).