Ticket #6755: django-admin-nodup_new.patch
File django-admin-nodup_new.patch, 883 bytes (added by , 16 years ago) |
---|
-
django/db/models/base.py
296 296 # attributes we have been given to the class we have been given. 297 297 if not raw: 298 298 for parent, field in meta.parents.items(): 299 # At this point, parent's primary key field may be unknown 300 # (for example, from administration form which doesn't fill 301 # this field). If so, fill it. 302 if getattr(self, parent._meta.pk.attname) is None and getattr(self, field.attname) is not None: 303 setattr(self, parent._meta.pk.attname, getattr(self, field.attname)) 304 299 305 self.save_base(raw, parent) 300 306 setattr(self, field.attname, self._get_pk_val(parent._meta)) 301 307