Skip to content

Kwargs should contain 'queryset' when child is a FormSet on edition #48

Open
@decolens

Description

@decolens

When using MultiForm for editing models (= putting 'instance' in the kwargs), if one or several of the forms contained inside the MultiForm are FormSet, a TypeError with message "init() got an unexpected keyword argument 'instance'" is raised.
I think this error is due to the "fkwargs = kwargs.copy()" line in the "get_form_args_kwargs" method of multiform.py. If the MultiForm kwargs are copied for any of the child, they will all contain the 'instance' argument, instead of the 'queryset' needed for FormSet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions