Ticket #1711: manipulators.diff

File manipulators.diff, 776 bytes (added by Gary Wilson <gary.wilson@…>, 9 years ago)
  • django/db/models/manipulators.py

     
    177177                        # case, because they'll be dealt with later.
    178178
    179179                        if f == related.field:
    180                             param = getattr(new_object, related.field.rel.field_name)
     180                            param = getattr(new_object, related.field.rel.get_related_field().attname)
    181181                        elif (not self.change) and isinstance(f, AutoField):
    182182                            param = None
    183183                        elif self.change and (isinstance(f, FileField) or not child_follow.get(f.name, None)):
Back to Top