This commit is contained in:
Levi 2017-06-09 15:36:14 -05:00
commit d43855adda
7 changed files with 36 additions and 19 deletions

View file

@ -10,6 +10,16 @@
<h2>{% trans "Your VM hosted in Switzerland"%}</h2>
</div>
<div class="auth-content">
{% if messages %}
<ul class="list-unstyled" style="color: #fff">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
{% endif %}
<div class="intro-message auth-box sign-up">
<h2 class="section-heading">{% trans "Reset your password"%}</h2>
<form action="{% url 'hosting:reset_password' %}" method="post" class="form" novalidate>

View file

@ -298,7 +298,7 @@ class SSHKeyDeleteView(LoginRequiredMixin, DeleteView):
manager = OpenNebulaManager()
pk = self.kwargs.get('pk')
# Get user ssh key
public_key = UserHostingKey.objects.get(pk=pk)
public_key = UserHostingKey.objects.get(pk=pk).public_key
# Add ssh key to user
try:
manager.remove_public_key(user=owner, public_key=public_key)