Opened 6 hours ago
Last modified 6 hours ago
#36608 new Uncategorized
dumpdata does not use custom serializers
Reported by: | ksauder | Owned by: | |
---|---|---|---|
Component: | Core (Management commands) | Version: | 5.2 |
Severity: | Release blocker | Keywords: | dumpdata custom serializers |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
As displayed in the diff, the code was simply broken and always raised an exception for custom serializer formats.
After further investigation, this problem could also be solved by adding 'internal_use_only = False' to the classes in the example here https://docs.djangoproject.com/en/5.2/topics/serialization/#custom-serialization-formats. This gets around the "if format in serializers.get_public_serializer_formats()" check, although the old code in the diff still doesn't make sense.
Attachments (1)
Change History (2)
by , 6 hours ago
Attachment: | dumpdata_fix.diff added |
---|
comment:1 by , 6 hours ago
Description: | modified (diff) |
---|