diff --git a/ietf/ietfauth/views.py b/ietf/ietfauth/views.py index b29b29321b..c02f2f2c02 100644 --- a/ietf/ietfauth/views.py +++ b/ietf/ietfauth/views.py @@ -777,7 +777,7 @@ class Meta: @person_required def apikey_disable(request): person = request.user.person - choices = [ (k.hash(), str(k)) for k in person.apikeys.all() ] + choices = [ (k.hash(), str(k)) for k in person.apikeys.exclude(valid=False) ] # class KeyDeleteForm(forms.Form): hash = forms.ChoiceField(label='Key', choices=choices) diff --git a/ietf/templates/ietfauth/apikeys.html b/ietf/templates/ietfauth/apikeys.html index ab6194151c..5ac7f6f453 100644 --- a/ietf/templates/ietfauth/apikeys.html +++ b/ietf/templates/ietfauth/apikeys.html @@ -37,9 +37,9 @@

{{ key.created }} {{ key.latest }} {{ key.count }} - {{ key.valid }} + {{ key.valid }} - {{ key.hash }} + {{ key.hash }} {% if key.valid %} @@ -63,4 +63,4 @@

{% endblock %} {% block js %} -{% endblock %} +{% endblock %} \ No newline at end of file