django-unfold icon indicating copy to clipboard operation
django-unfold copied to clipboard

unfold.contrib.import_export stopped working.

Open lahuindai opened this issue 1 year ago • 3 comments

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'

lahuindai avatar May 05 '24 23:05 lahuindai

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

lukasvinclav avatar May 06 '24 07:05 lukasvinclav

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

ZairMahmood avatar May 06 '24 11:05 ZairMahmood

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

TheAbhijeet avatar May 20 '24 05:05 TheAbhijeet

Fixed in #398

lukasvinclav avatar May 21 '24 05:05 lukasvinclav