Opened 18 years ago

Closed 18 years ago

#3741 closed (fixed)

Serializers don't work with GenericRelations

Reported by: Russell Keith-Magee Owned by: Russell Keith-Magee
Component: Core (Serialization) Version: dev
Severity: Keywords: Generic Relation
Cc: alexander.solovyov@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Alexander Solovyov <alexander.solovyov@…> reports that a model with a GenericRelation doesn't serialize properly; he has tried XML, JSON,and python serializers, and has problems with all of them. Under XML, for example, he gets:

Problem installing fixture 'product/fixtures/initial_data.xml': 'int' object has no attribute 'content_type'

The generic relation serializes as:

<field to="tag.taggeditem" name="tags" rel="GenericRel">
 <object pk="10"></object>
 <object pk="11"></object>
</field>

Which, by inspection, is ambiguous.

Change History (3)

comment:1 by Simon G. <dev@…>, 18 years ago

Triage Stage: UnreviewedAccepted

comment:2 by anonymous, 18 years ago

Cc: alexander.solovyov@… added

comment:3 by Russell Keith-Magee, 18 years ago

Resolution: fixed
Status: newclosed

(In [4752]) Fixed #3741 -- Fixed serialization of GenericRelations. Thanks for the report, Alexander Solovyov.

Note: See TracTickets for help on using tickets.
Back to Top