Improved error handling.

This commit is contained in:
Martin Edenhofer 2014-08-18 16:14:11 +02:00
parent 91dbba5adf
commit d7ae9e0da3
2 changed files with 11 additions and 7 deletions

View file

@ -14,10 +14,13 @@ class App.OrganizationZoom extends App.Controller
url: @url() url: @url()
id: @organization_id id: @organization_id
organization = App.Organization.find( @organization_id ) if App.Organization.exists( @organization_id )
if organization organization = App.Organization.find( @organization_id )
meta.head = organization.displayName()
meta.title = organization.displayName() meta.head = organization.displayName()
meta.title = organization.displayName()
meta.iconClass = organization.icon()
meta meta
url: => url: =>

View file

@ -15,11 +15,12 @@ class App.UserZoom extends App.Controller
url: @url() url: @url()
id: @user_id id: @user_id
user = App.User.find( @user_id ) if App.User.exists( @user_id )
if user user = App.User.find( @user_id )
meta.head = user.displayName() meta.head = user.displayName()
meta.title = user.displayName() meta.title = user.displayName()
meta.iconClass = @user.icon() meta.iconClass = user.icon()
meta meta
url: => url: =>