Commit 4380b8d9 by Őry Máté

one: add success indication to key add

parent 4dd3ffd2
...@@ -478,9 +478,13 @@ def key_add(request): ...@@ -478,9 +478,13 @@ def key_add(request):
key.save() key.save()
_update_keys(request.user) _update_keys(request.user)
except ValidationError as e: except ValidationError as e:
messages.error(request, ''.join(e.messages)) for m in e.messages:
messages.error(request, m)
except: except:
messages.error(request, _('Failed to add public key')) messages.error(request, _('Failed to add public key.'))
else:
messages.successfully(request, _('Public key successfully added.'))
return redirect('/') return redirect('/')
@login_required @login_required
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment