Ticket #6781: edit_inline_too_many_lists.patch
File edit_inline_too_many_lists.patch, 1.6 KB (added by , 17 years ago) |
---|
-
django/db/models/manipulators.py
170 170 pass 171 171 172 172 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, ''): 174 177 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, ''): 176 179 all_cores_blank = False 177 180 # If this field isn't editable, give it the same value it had 178 181 # previously, according to the given ID. If the ID wasn't … … 189 192 else: 190 193 param = f.get_default() 191 194 else: 192 param = f.get_manipulator_new_data(rel_new_data, rel=True)195 param = new_data 193 196 if param != None: 194 197 params[f.attname] = param 195 198