Ticket #7778: fix_delete.diff

File fix_delete.diff, 718 bytes (added by bthomas, 7 years ago)
  • django/db/models/query.py

     
    822822        update_query = sql.UpdateQuery(cls, connection)
    823823        for field, model in cls._meta.get_fields_with_model():
    824824            if (field.rel and field.null and field.rel.to in seen_objs and
    825                     filter(lambda f: f.column == field.column,
     825                    filter(lambda f: f.column == field.rel.get_related_field().name,
    826826                    field.rel.to._meta.fields)):
    827827                if model:
    828828                    sql.UpdateQuery(model, connection).clear_related(field,
Back to Top