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

unfold.contrib.import_export stopped working. #372

Closed
lahuindai opened this issue May 5, 2024 · 4 comments
Closed

unfold.contrib.import_export stopped working. #372

lahuindai opened this issue May 5, 2024 · 4 comments

Comments

@lahuindai
Copy link

File "/home/ggreyling/projects/digichemplus-server/.venv/lib/python3.12/site-packages/import_export/admin.py", line 876, in export_admin_action
form = form_type(
^^^^^^^^^^
File "/home/ggreyling/projects/digichemplus-server/.venv/lib/python3.12/site-packages/unfold/contrib/import_export/forms.py", line 16, in init
self.fields["file_format"].widget.attrs["class"] = " ".join(SELECT_CLASSES)
~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'file_format'

@lukasvinclav
Copy link
Contributor

I just tested export functionality and it seems it works. Do you have any additional information how it is possible to reproduce the issue?

@ZairMahmood
Copy link

ZairMahmood commented May 6, 2024

Looking at the latest release docs, file_format and input_format was moved thus causing a break:
https://django-import-export.readthedocs.io/en/stable/release_notes.html#import-export-forms-importexportformbase

@TheAbhijeet
Copy link

TheAbhijeet commented May 20, 2024

Downgrading import-export to 3.3.9 is a potential short-term fix.

@lukasvinclav
Copy link
Contributor

Fixed in #398

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

No branches or pull requests

4 participants