mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-10 00:56:19 +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:
@@ -104,7 +104,7 @@ def srp_fleet_add_view(request):
|
||||
form = SrpFleetMainForm(request.POST)
|
||||
logger.debug("Request type POST contains form valid: %s" % form.is_valid())
|
||||
if form.is_valid():
|
||||
authinfo = AuthServicesInfo.objects.get_or_create(user=request.user)[0]
|
||||
authinfo = AuthServicesInfo.objects.get(user=request.user)
|
||||
character = EveManager.get_character_by_id(authinfo.main_char_id)
|
||||
|
||||
srp_fleet_main = SrpFleetMain()
|
||||
@@ -231,7 +231,7 @@ def srp_request_view(request, fleet_srp):
|
||||
logger.debug("Request type POST contains form valid: %s" % form.is_valid())
|
||||
|
||||
if form.is_valid():
|
||||
authinfo = AuthServicesInfo.objects.get_or_create(user=request.user)[0]
|
||||
authinfo = AuthServicesInfo.objects.get(user=request.user)
|
||||
character = EveManager.get_character_by_id(authinfo.main_char_id)
|
||||
srp_fleet_main = SrpFleetMain.objects.get(fleet_srp_code=fleet_srp)
|
||||
post_time = timezone.now()
|
||||
|
||||
Reference in New Issue
Block a user