| 1 | Index: django/core/meta/__init__.py
|
|---|
| 2 | ===================================================================
|
|---|
| 3 | --- django/core/meta/__init__.py (revision 479)
|
|---|
| 4 | +++ django/core/meta/__init__.py (working copy)
|
|---|
| 5 | @@ -1424,7 +1424,10 @@
|
|---|
| 6 | # [('0', {'id': ['940'], 'choice': ['This is the first choice']}),
|
|---|
| 7 | # ('1', {'id': ['941'], 'choice': ['This is the second choice']}),
|
|---|
| 8 | # ('2', {'id': [''], 'choice': ['']})]
|
|---|
| 9 | - obj_list = DotExpandedDict(new_data.data)[rel_opts.object_name.lower()].items()
|
|---|
| 10 | + try:
|
|---|
| 11 | + obj_list = DotExpandedDict(new_data.data)[rel_opts.object_name.lower()].items()
|
|---|
| 12 | + except KeyError:
|
|---|
| 13 | + continue
|
|---|
| 14 | obj_list.sort(lambda x, y: cmp(int(x[0]), int(y[0])))
|
|---|
| 15 | params = {}
|
|---|
| 16 |
|
|---|