| | 7 | |
| | 8 | Also I believe that the logic about preparing queryset in BaseInlineFormSet should exist in a separate function called `prepare_queryset`: |
| | 9 | |
| | 10 | |
| | 11 | {{{ |
| | 12 | def prepare_queryset(queryset): |
| | 13 | if queryset is None: |
| | 14 | queryset = self.model._default_manager |
| | 15 | if self.instance.pk is not None: |
| | 16 | qs = queryset.filter(**{self.fk.name: self.instance}) |
| | 17 | else: |
| | 18 | qs = queryset.none() |
| | 19 | return qs |
| | 20 | }}} |
| | 21 | instead if throwing it `__init__` Intit could just call the above to get the value . This way filtering wouldn't be enforced in the case of related manager querysets since we could overwrite the method. |