mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Catches errors while importing API keys
This commit is contained in:
@@ -84,6 +84,10 @@ def eveapi_add(request):
|
|||||||
except APIAuthException:
|
except APIAuthException:
|
||||||
return HttpResponseRedirect(reverse('sso.views.profile'))
|
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.user = request.user
|
||||||
acc.description = form.cleaned_data['description']
|
acc.description = form.cleaned_data['description']
|
||||||
acc.save()
|
acc.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user