Ticket #7488: baseinlineformset.patch
File baseinlineformset.patch, 748 bytes (added by , 16 years ago) |
---|
-
newforms/models.py
410 410 Returns this FormSet's queryset, but restricted to children of 411 411 self.instance 412 412 """ 413 kwargs = {self.fk.name: self.instance} 414 return self.model._default_manager.filter(**kwargs) 413 if self.instance.pk: 414 kwargs = {self.fk.name: self.instance} 415 return self.model._default_manager.filter(**kwargs) 416 else: 417 return self.model._default_manager.get_empty_query_set() 415 418 416 419 def save_new(self, form, commit=True): 417 420 kwargs = {self.fk.get_attname(): self.instance.pk}