create_moderator command fails if User has no Profile
prashantsinalkar opened this issue · 0 comments
prashantsinalkar commented
When starting a new project, trying to add a superuser (that has been created using the createsuperuser
command) as a moderator throws the following exception.
django.db.models.fields.related_descriptors.RelatedObjectDoesNotExist: User has no profile.
Steps to replicate:
- Clone the repository
- Run
python manage.py migrate
command - Run
python manage.py createsuperuser
command and create an admin user - Run
python manage.py create_moderator admin