Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass form into get_import_data_kwargs #1108

Merged

Conversation

mgrdcm
Copy link
Contributor

@mgrdcm mgrdcm commented Apr 18, 2020

Problem

During the preview dry run, the ImportForm is passed into Resource.get_import_data_kwargs. However, during the actual import phase the ConfirmImportForm is not passed into the same method. This means there's no way to get values set in the ConfirmImportForm into the Resource's import process.

Solution

Passing the confirm form into get_import_data_kwargs during the actual import process.

Acceptance Criteria

There are no existing tests that cover this, and no appropriate documentation to update. I don't think a test case for this is warranted but let me know if I'm wrong!

During the preview dry run, the ImportForm is passed into Resource.get_import_data_kwargs.  However, during the actual import phase the ConfirmImportForm is not passed into the same method.  This changes that.

Use case:  getting data from the confirm form into the resource's import process.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 96.101% when pulling 126666b on mgrdcm:also_pass_confirm_form into 7c58899 on django-import-export:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.03%) to 96.101% when pulling 126666b on mgrdcm:also_pass_confirm_form into 7c58899 on django-import-export:master.

@andrewgy8 andrewgy8 merged commit 7c00a2f into django-import-export:master Apr 26, 2020
ZuluPro pushed a commit to ZuluPro/django-import-export that referenced this pull request Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants