Ticket #887: django.core.meta.init.diff
File django.core.meta.init.diff, 762 bytes (added by , 19 years ago) |
---|
-
django/core/meta/__init__.py
1594 1594 1595 1595 # Get a reference to the old object. We'll use it to compare the 1596 1596 # old to the new, to see which fields have changed. 1597 old_rel_obj = None 1597 1598 if change: 1598 old_rel_obj = None1599 1599 if rel_new_data[rel_opts.pk.name][0]: 1600 1600 try: 1601 1601 old_rel_obj = getattr(self.original_object, 'get_%s' % opts.get_rel_object_method_name(rel_opts, rel_field))(**{'%s__exact' % rel_opts.pk.name: rel_new_data[rel_opts.pk.attname][0]})