diff --git a/app/controllers/admin/certificates_controller.rb b/app/controllers/admin/certificates_controller.rb index 34078aee7..636a69367 100644 --- a/app/controllers/admin/certificates_controller.rb +++ b/app/controllers/admin/certificates_controller.rb @@ -28,7 +28,11 @@ module Admin end def destroy - if @certificate.revoke! && @certificate.destroy + if @certificate.interface == Certificate::REGISTRAR + @certificate.revoke! + end + + if @certificate.destroy flash[:notice] = I18n.t('record_deleted') redirect_to admin_api_user_path(@api_user) else