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

Export crashes if the column name is used instead of the attribute name #1828

Closed
matthewhegarty opened this issue May 13, 2024 · 0 comments · Fixed by #1829
Closed

Export crashes if the column name is used instead of the attribute name #1828

matthewhegarty opened this issue May 13, 2024 · 0 comments · Fixed by #1829
Assignees
Labels

Comments

@matthewhegarty
Copy link
Contributor

matthewhegarty commented May 13, 2024

Describe the bug

Export will crash if you use a column_name in the fields list. v3 works fine if you use either the column_name or attribute.

To Reproduce

Using EBook, change the meta fields list to

fields = ("id", "author_email", "name", "published_date")

When exporting, the process will crash with KeyError

Versions (please complete the following information):

  • Django Import Export: latest

Expected behavior

Either a decent error message, or handle the use of the column name. (import handles the use of the column name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant