Changes between Version 1 and Version 2 of Ticket #25009, comment 2


Ignore:
Timestamp:
Jun 19, 2015, 6:10:37 PM (9 years ago)
Author:
Coen van der Kamp

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25009, comment 2

    v1 v2  
    1010    extra_fields.setdefault('is_staff', True)
    1111    extra_fields.setdefault('is_superuser', True)
    12     if extra_fields.get('is_staff') is False:
     12    if not extra_fields.get('is_staff'):
    1313        raise ValueError('Superuser needs to be staff. Do not set is_staff.')
    14     if extra_fields.get('is_superuser') is False:
     14    if not extra_fields.get('is_superuser'):
    1515        raise ValueError('Superuser needs to be superuser. Do not set is_superuser.')
    16 
    1716    return self._create_user(username, email, password, **extra_fields)
    1817}}}
Back to Top