summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: