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

Fix error in command #4345

Merged
merged 1 commit into from Jul 10, 2018
Merged

Fix error in command #4345

merged 1 commit into from Jul 10, 2018

Conversation

@stsewd
Copy link
Member

@stsewd stsewd commented Jul 9, 2018

This fix an error introduced in https://github.com/rtfd/readthedocs.org/pull/4321/files#r200705086

From django:

Now that management commands use argparse for argument parsing, all arguments are passed in **options by default, unless you name your positional arguments to args (compatibility mode). You are encouraged to exclusively use **options for new commands.

This is the only command that I found using args, so the others should be fine.

@stsewd stsewd requested a review from Jul 9, 2018
@ericholscher
Copy link
Member

@ericholscher ericholscher commented Jul 10, 2018

Looks good. Sorry I didn't catch this on initial review!

@ericholscher ericholscher merged commit 1fb6dd3 into readthedocs:master Jul 10, 2018
1 check passed
@stsewd stsewd deleted the fix-command-error branch Jul 10, 2018
@@ -56,7 +58,7 @@ def handle(self, *args, **options):
force = options['force']
version = options['version']
if args:
Copy link
Member

@humitos humitos Jul 14, 2018

Here we need to check if options now instead of if args otherwise it fails in a weird way :)

humitos added a commit that referenced this issue Jul 16, 2018
humitos added a commit that referenced this issue Jul 16, 2018
mashrikt added a commit to mashrikt/readthedocs.org that referenced this issue Jul 25, 2018
mashrikt added a commit to mashrikt/readthedocs.org that referenced this issue Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants