diff options
| author | Claude Paroz <claude@2xlibre.net> | 2013-11-20 21:34:29 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2013-11-20 21:36:20 +0100 |
| commit | fafb6cf049bb9f4591a8b94cffda12c081cd096f (patch) | |
| tree | 05ee181d882cc468fa1dedb1581dba905dec6b53 /django/forms | |
| parent | 8f5a688d00f2f73a0913acb04247322f13e2c971 (diff) | |
Fixed #21472 -- Fixed inline formsets display when parent pk is 0
Thanks agale031176@gmail.com for the report.
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/models.py b/django/forms/models.py index 9e8feb2ee9..3625dc8334 100644 --- a/django/forms/models.py +++ b/django/forms/models.py @@ -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() |
