#34542: Required fields allowed to be blank are not accepted non-interactively
using createsuperuser
-------------------------------------+-------------------------------------
     Reporter:  Lantizia             |                    Owner:  Anvansh
                                     |  Singh
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  auth                 |             Triage Stage:  Accepted
  createsuperuser superuser email    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mateusz Więckowski):

 Hi! I'm not entirely sure that I understood the problem, but if so, I do
 believe I have created a solution.

 In the 'non-interactive' part of the code where the error is thrown (e.g.,
 CommandError: You must use --email with --noinput), I added a block of
 code that checks if the field is allowed to be blank. If that's the case,
 I simply do not raise the error.

 This is how it works for me now:
 {{{
 py manage.py createsuperuser --username username --noinput

 Superuser created successfully.
 }}}

 Let me know if that's what was the issue with this one.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34542#comment:13>
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/0107018931731db0-64686752-909c-4f5f-a33a-e729358db56e-000000%40eu-central-1.amazonses.com.

Reply via email to