﻿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
16208	natural key YAML deserialization using non-list natural keys broken (with fixing patch)	jeff.k@…	kenth	"I'm using Django 1.2.5.  I had trouble loading data from a fixture using the natural keys feature.  I tracked this down to what seems to be a bug in the deserialization code for YAML data.  If the field used as a natural key is a tuple, (has an __iter__ method in the yaml reader) the get_by_natural_key() method is called, but if it's a singleton, the same code is called that would be if no get_by_natural_key() method were defined.

I made a patch that I believe fixes this bug (attached).  It fixes the issue for me.  I don't have a full working copy of Django set up, so I just generated this with POSIX diff; sorry if that's inconvenient.
"	Bug	closed	Core (Serialization)	1.2	Normal	invalid	yaml		Accepted	1	0	1	1	1	0
