Ticket #6755: django-admin-nodup.patch
File django-admin-nodup.patch, 800 bytes (added by , 16 years ago) |
---|
-
django/db/models/base.py
291 291 signal = False 292 292 293 293 for parent, field in meta.parents.items(): 294 # At this point, parent's primary key field may be unknown 295 # (for example, from administration form which doesn't fill 296 # this field). If so, fill it. 297 if getattr(self, parent._meta.pk.attname) is None and getattr(self, field.attname) is not None: 298 setattr(self, parent._meta.pk.attname, getattr(self, field.attname)) 299 294 300 self.save_base(raw, parent) 295 301 setattr(self, field.attname, self._get_pk_val(parent._meta)) 296 302