Ticket #6781: edit_inline_too_many_lists.patch

File edit_inline_too_many_lists.patch, 1.6 KB (added by imbaczek@…, 17 years ago)
  • django/db/models/manipulators.py

     
    170170                                pass
    171171
    172172                    for f in related.opts.fields:
    173                         if f.core and not isinstance(f, FileField) and f.get_manipulator_new_data(rel_new_data, rel=True) in (None, ''):
     173                        new_data = f.get_manipulator_new_data(rel_new_data, rel=True)
     174                        if new_data is not None:
     175                            new_data = new_data[0]
     176                        if f.core and not isinstance(f, FileField) and new_data in (None, False, ''):
    174177                            all_cores_given = False
    175                         elif f.core and not isinstance(f, FileField) and f.get_manipulator_new_data(rel_new_data, rel=True) not in (None, ''):
     178                        elif f.core and not isinstance(f, FileField) and new_data not in (None, False, ''):
    176179                            all_cores_blank = False
    177180                        # If this field isn't editable, give it the same value it had
    178181                        # previously, according to the given ID. If the ID wasn't
     
    189192                            else:
    190193                                param = f.get_default()
    191194                        else:
    192                             param = f.get_manipulator_new_data(rel_new_data, rel=True)
     195                            param = new_data
    193196                        if param != None:
    194197                            params[f.attname] = param
    195198
Back to Top