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

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 a team July 9, 2018 19:04
@ericholscher
Copy link
Member

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pull request Jul 16, 2018
humitos added a commit that referenced this pull request Jul 16, 2018
mashrikt pushed a commit to mashrikt/readthedocs.org that referenced this pull request Jul 25, 2018
mashrikt pushed a commit to mashrikt/readthedocs.org that referenced this pull request 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
Development

Successfully merging this pull request may close these issues.

3 participants