Opened 19 years ago
Closed 19 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 , 19 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 19 years ago
| Cc: | added |
|---|
comment:3 by , 19 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [4752]) Fixed #3741 -- Fixed serialization of GenericRelations. Thanks for the report, Alexander Solovyov.