﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26826	dumpdata command using multiple pks that are UUIDs produces error	TheKGF	Nathan Schagen	"For any table who's pk is a UUID object this should happen. 

Model contains something like:

{{{id = UUIDField(primary_key=True, editable=False, default=uuid.uuid4)}}}

Run from command line:

{{{python manage.py dumpdata foo.field --pks ""2d5ae31c-c2ba-4a81-8351-35376327d33c, bc4e1ee5-1cfe-43f7-84f0-8bce347d144d""}}}

is producing the error

`CommandError: Unable to serialize database: badly formed hexadecimal UUID string`

In a naive imlementation to address it, I made the following modification in dumpdata.py, although I've only really been thinking of my use case here.


{{{
[56]primary_keys = pks.split(',')
    for i, primary_key in enumerate(primary_keys):
        try:
            uuid_item = uuid.UUID(primary_key.strip())
            primary_keys[i] = uuid_item
        except ValueError:
             pass
}}}
"	Bug	closed	Core (Management commands)	1.9	Normal	fixed	dumpdata uuid		Ready for checkin	1	0	0	0	0	0
