diff options
author | Peter Kozak <spag@golwen.net> | 2013-05-05 09:40:51 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-05-05 09:40:51 +0200 |
commit | 11dc1567646feed73d908d293cd0fcba4c6224bb (patch) | |
tree | 97bafb671faae2484d26de2711b5ba7ed499f754 /app | |
parent | 4cd6ef5dc7b98e389ef526db448deaaa611f926e (diff) |
routes can be nil
Diffstat (limited to 'app')
-rw-r--r-- | app/models/phone_number.rb | 4 |
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: |