tickets: 16208
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16208 | 2011-06-09 19:50:36 | 2012-06-28 11:08:52 | 2022-03-06 04:02:34.031454 | Accepted | closed | Core (Serialization) | Bug | Normal | 1.2 | invalid | natural key YAML deserialization using non-list natural keys broken (with fixing patch) | 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. | kenth | jeff.k@benetech.org | yaml | 1 | 1 | 1 | 1 | 0 | 0 |