diff --git a/ietf/ietfauth/views.py b/ietf/ietfauth/views.py index b29b29321..c02f2f2c0 100644 --- a/ietf/ietfauth/views.py +++ b/ietf/ietfauth/views.py @@ -777,7 +777,7 @@ def apikey_create(request): @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 ab6194151..5ac7f6f45 100644 --- a/ietf/templates/ietfauth/apikeys.html +++ b/ietf/templates/ietfauth/apikeys.html @@ -37,9 +37,9 @@
{{ key.hash }}
+ {{ key.hash }}