Ticket #2579: fix_raw_id_admin_m2m.patch
File fix_raw_id_admin_m2m.patch, 754 bytes (added by , 18 years ago) |
---|
-
django/db/models/manipulators.py
old new 118 118 if not f.rel.edit_inline: 119 119 if f.rel.raw_id_admin: 120 120 new_vals = new_data.get(f.name, ()) 121 # Not handling 'empty' raw_id_admin fields properly 122 # If nothing was entered, skip the rel manager add 123 if len(new_vals) == 1 and '' == new_vals[0]: 124 continue 121 125 else: 122 126 new_vals = new_data.getlist(f.name) 123 127 # First, clear the existing values.