Ticket #9308: fix_delete.diff
File fix_delete.diff, 718 bytes (added by , 16 years ago) |
---|
-
django/db/models/query.py
852 852 update_query = sql.UpdateQuery(cls, connection) 853 853 for field, model in cls._meta.get_fields_with_model(): 854 854 if (field.rel and field.null and field.rel.to in seen_objs and 855 filter(lambda f: f.column == field. column,855 filter(lambda f: f.column == field.rel.get_related_field().name, 856 856 field.rel.to._meta.fields)): 857 857 if model: 858 858 sql.UpdateQuery(model, connection).clear_related(field,