This commit is contained in:
Joel Falknau 2024-12-30 20:28:54 +10:00
parent f6cb28d64b
commit 8f33c649b3
No known key found for this signature in database
2 changed files with 2 additions and 6 deletions

View File

@ -112,14 +112,12 @@ class MumbleUser(AbstractServiceModel):
username_clean, pwhash[0:5]))
logger.info(f"Creating mumble user {username_clean}")
result = self.objects.create(user=user, username=username_clean, pwhash=pwhash)
result = super().create(user=user, username=username_clean, pwhash=pwhash)
result.credentials.update({'username': result.username, 'password': password})
return result
except AttributeError: # No Main or similar errors
return False
def user_exists(self, username) -> bool:
return self.objects.filter(username=username).exists()
return False
class Meta:
verbose_name = _("User")

View File

@ -1,10 +1,8 @@
from datetime import datetime, timezone
import logging
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from celery import shared_task
from allianceauth.services.tasks import QueueOnce
from .models import MumbleUser, TempLink, TempUser
logger = logging.getLogger(__name__)