summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-05-05 09:40:51 +0200
committerPeter Kozak <spag@golwen.net>2013-05-05 09:40:51 +0200
commit11dc1567646feed73d908d293cd0fcba4c6224bb (patch)
tree97bafb671faae2484d26de2711b5ba7ed499f754 /app/models
parent4cd6ef5dc7b98e389ef526db448deaaa611f926e (diff)
routes can be nil
Diffstat (limited to 'app/models')
-rw-r--r--app/models/phone_number.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/phone_number.rb b/app/models/phone_number.rb
index 919b703..4b22f40 100644
--- a/app/models/phone_number.rb
+++ b/app/models/phone_number.rb
@@ -240,7 +240,9 @@ class PhoneNumber < ActiveRecord::Base
'caller.account_uuid' => account.try(:uuid),
})
- return routes['routes']['1']
+ if routes
+ return routes['routes']['1']
+ end
end
# Find the (grand-)parent tenant of this phone number: