Load extensions before doing anything else.

This commit is contained in:
Antoine Nguyen
2017-09-22 14:54:18 +02:00
parent 9222640e87
commit 4c087f474c
@@ -40,6 +40,8 @@ class Command(BaseCommand):
def handle(self, *args, **options):
"""Command entry point."""
extensions.exts_pool.load_all()
if not models.User.objects.filter(is_superuser=True).count():
admin = models.User(
username=options["admin_username"], is_superuser=True)
@@ -59,8 +61,6 @@ class Command(BaseCommand):
for service_name in ["relay", "smtp"]:
relay_models.Service.objects.get_or_create(name=service_name)
extensions.exts_pool.load_all()
groups = list(constants.PERMISSIONS.keys())
for groupname in groups:
group, created = Group.objects.get_or_create(name=groupname)