Skip to content
This repository has been archived by the owner on Feb 14, 2021. It is now read-only.

Incorrect defaults for --format option in management command #4

Closed
zerolab opened this issue Apr 8, 2020 · 2 comments
Closed

Incorrect defaults for --format option in management command #4

zerolab opened this issue Apr 8, 2020 · 2 comments
Assignees

Comments

@zerolab
Copy link

zerolab commented Apr 8, 2020

The default , value for the --format option in the management command is incorrect.
Tablib expects it to be one of "csv", "tsv", "xls", "json" (and any of the supported ones in the https://tablib.readthedocs.io/en/stable/formats/#csv list)

@marteinn
Copy link
Member

marteinn commented Apr 8, 2020

https://github.com/Frojd/wagtail-redirect-importer/blob/develop/wagtail_redirect_importer/management/commands/import_redirects.py#L46 = 🤦‍♂ . Thanks for reporting @zerolab, we'll make sure this gets addressed in the next release :)

@marteinn
Copy link
Member

I've changed the logic in CLI, format should not be required, format uses a choice list (generated by tablib) so we can better represent choices to users and finally solved a bug when using file extension as format. Closing this and any related error will get a new issue.

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

No branches or pull requests

2 participants