#36062: Deserializing CompositePrimaryKey from a string raises  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:  1
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):

 As pointed out on the PR we likely need to implement the proper
 `value_to_string`, `value_from_object`, and `to_python` methods for
 `CompositePrimaryKey` ([https://docs.djangoproject.com/en/5.1/howto
 /custom-model-fields/#converting-model-field-to-serialization docs]) and
 ensure the serialization framework calls `value_to_string` instead of
 making direct `str` calls.

 See how it's done for `JSONField`, `postgres.ArrayField`, and
 `HStoreField` for example.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36062#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701943ce68a9a-bfd9b7ff-5c9b-4893-ae0a-03fbfaaa4373-000000%40eu-central-1.amazonses.com.

Reply via email to