Ticket #7245: propagate-all-pk-values-7245.patch
File propagate-all-pk-values-7245.patch, 678 bytes (added by , 17 years ago) |
---|
-
django/db/models/manipulators.py
95 95 params[f.attname] = param 96 96 97 97 if self.change: 98 params[self.opts.pk.attname] = self.obj_key 98 def propagate_pks( opts ): 99 params[opts.pk.attname] = self.obj_key 100 for p in opts.parents.keys(): 101 propagate_pks( p._meta ) 102 propagate_pks( self.opts ) 99 103 100 104 # First, create the basic object itself. 101 105 new_object = self.model(**params)