Browse Source

Do not try to display service_label when service has been deleted

Fixes an exception in AgentController#show when the service of an oauthable
agent has been deleted.
Dominik Sander 9 years ago
parent
commit
8252e727a2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/helpers/application_helper.rb

+ 1 - 0
app/helpers/application_helper.rb

@@ -80,6 +80,7 @@ module ApplicationHelper
   end
 
   def service_label(service)
+    return if service.nil?
     content_tag :span, [
       omniauth_provider_icon(service.provider),
       service_label_text(service)