mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Catches errors while importing API keys
This commit is contained in:
@@ -84,6 +84,10 @@ def eveapi_add(request):
|
||||
except APIAuthException:
|
||||
return HttpResponseRedirect(reverse('sso.views.profile'))
|
||||
|
||||
if not acc:
|
||||
request.user.message_set.create(message="A error was encountered while adding your API key, try again later. If the issue persists, contact a Admin.")
|
||||
return HttpResponseRedirect(reverse('sso.views.profile'))
|
||||
|
||||
acc.user = request.user
|
||||
acc.description = form.cleaned_data['description']
|
||||
acc.save()
|
||||
|
||||
Reference in New Issue
Block a user