mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-08 20:10:17 +02:00
cleanup
This commit is contained in:
parent
f6cb28d64b
commit
8f33c649b3
@ -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")
|
||||
|
@ -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__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user