mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-09 16:46:20 +01:00
Enforce unique AuthServicesInfo (#618)
Alter user field to OneToOneField Migration to enforce uniqueness pre-change Migration to ensure all users have an AuthServicesInfo Receiver to automatically create one upon user creation Replace AuthServicesInfo.get_or_create with get Prevent deletion of AuthServicesInfo from admin site Remove add and delete permissions from model. Get character names in chunks on corpstats update to prevent HTTP400 when requesting >350(ish) names Include corpstats docs. Update settings docs.
This commit is contained in:
@@ -19,7 +19,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def create_application_test(user):
|
||||
auth, c = AuthServicesInfo.objects.get_or_create(user=user)
|
||||
auth = AuthServicesInfo.objects.get(user=user)
|
||||
if auth.main_char_id:
|
||||
return True
|
||||
else:
|
||||
@@ -31,7 +31,7 @@ def hr_application_management_view(request):
|
||||
logger.debug("hr_application_management_view called by user %s" % request.user)
|
||||
corp_applications = []
|
||||
finished_corp_applications = []
|
||||
auth_info, c = AuthServicesInfo.objects.get_or_create(user=request.user)
|
||||
auth_info = AuthServicesInfo.objects.get(user=request.user)
|
||||
main_char = None
|
||||
if auth_info.main_char_id:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user