mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Load extensions before doing anything else.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user