#32047: Required mutually exclusive groups don't work boolean arguments.
-------------------------------------+-------------------------------------
Reporter: Mark Gajdosik | Owner: nobody
Type: Bug | Status: closed
Component: Core (Management | Version: 3.1
commands) |
Severity: Normal | Resolution: invalid
Keywords: call_command, | Triage Stage: Accepted
exclusive group, store_true, |
action, explicit, error |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):
* cc: Hasan Ramezani, Alex Tomic (added)
* stage: Unreviewed => Accepted
Comment:
> 1. I'm not using your trac as a support channel. This was the first time
I used it and I doubt I'll use it again.
I'm sorry you had a bad experience. From the ticket description I assumed
that you're trying to find a way to pass a boolean argument, that's why I
took it as a support question.
> 2. RE the actual issue: docs for call_comamnd clearly state: "command
options that take no arguments are passed as keywords with True or False".
This works fine, until the arg is placed inside a group. The docs don't
mention this.
Good catch, I can reproduce this issue for a required mutually exclusive
groups with boolean arguments. We should probably change
[https://github.com/django/django/blob/91669cc566918fde4fe98f867cf4c406f64504e6/django/core/management/__init__.py#L140-L146
preparing boolean arguments] before passing them to `parse_args()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/32047#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/070.60b4031a7005eae30b8ad6a07c31a754%40djangoproject.com.