mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #21472 -- Fixed inline formsets display when parent pk is 0
Thanks agale031176@gmail.com for the report.
This commit is contained in:
		| @@ -843,7 +843,7 @@ class BaseInlineFormSet(BaseModelFormSet): | ||||
|         self.save_as_new = save_as_new | ||||
|         if queryset is None: | ||||
|             queryset = self.model._default_manager | ||||
|         if self.instance.pk: | ||||
|         if self.instance.pk is not None: | ||||
|             qs = queryset.filter(**{self.fk.name: self.instance}) | ||||
|         else: | ||||
|             qs = queryset.none() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user