Re: [Django] #36062: Deserializing CompositePrimaryKey from XML raises ValueError

5 views
Skip to first unread message

Django

unread,
Jan 6, 2025, 5:45:53 AM1/6/25
to django-...@googlegroups.com
#36062: Deserializing CompositePrimaryKey from XML raises ValueError
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Sarah
| Boyce
Type: Bug | Status: assigned
Component: Core | Version: dev
(Serialization) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36062#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 6, 2025, 9:07:24 AM1/6/25
to django-...@googlegroups.com
#36062: Deserializing CompositePrimaryKey from XML raises ValueError
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Sarah
| Boyce
Type: Bug | Status: assigned
Component: Core | Version: dev
(Serialization) |
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

Thanks for jumping on this, Sarah. This was buried at the bottom of the
ticket, but there is a similar issue with the JSON and YAML serializers.
For example, adjusting this test model fails produces more failures. Would
you prefer a new ticket?

{{{#!diff
diff --git a/tests/serializers/models/base.py
b/tests/serializers/models/base.py
index e4fcee366d..a2e5aca323 100644
--- a/tests/serializers/models/base.py
+++ b/tests/serializers/models/base.py
@@ -150,6 +150,7 @@ class TeamField(models.CharField):


class Player(models.Model):
+ pk = models.CompositePrimaryKey("name", "rank", "team")
name = models.CharField(max_length=50)
rank = models.IntegerField()
team = TeamField()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36062#comment:4>
Reply all
Reply to author
Forward
0 new messages