#21259: Wizard sets queryset instead of instance on InlineFormset -----------------------------------+----------------------------------- Reporter: banderkat@… | Owner: nobody Type: Bug | Status: new Component: contrib.formtools | Version: master Severity: Normal | Keywords: wizard, InlineFormSet Triage Stage: Unreviewed | Has patch: 1 Easy pickings: 0 | UI/UX: 0 -----------------------------------+----------------------------------- Because {{{InlineFormSet}}} subclasses {{{BaseModelFormSet}}}, the wizard thinks it's like any {{{BaseModelFormSet}}} and incorrectly initializes the form by setting the form's {{{queryset}}} instead of the form's {{{instance}}}. An {{{InlineFormSet}}} needs to have its instance set to the parent model object instead.
Currently, attempting to set {{{self.instance}}} for the {{{InlineFormSet}}} in the wizard's {{{get_form_instance}}} results in an {{{AttributeError}}} saying "object has no attribute 'none'" as the wizard attempts to set the form's queryset (instead of instance) with it's {{{self.instance}}}. I have a fix to propose here: [https://github.com/flibbertigibbet/django/commit/885798aa250544bd5c6d3a7325dc5c20c0795f2c] -- Ticket URL: <https://code.djangoproject.com/ticket/21259> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/062.ebde8dc15528f4b3ac6fd59f1fc09eb2%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.