Use default OGM when error loading customer

Stephen Paul Weber created

Change summary

web.rb | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)

Detailed changes

web.rb 🔗

@@ -292,16 +292,14 @@ class Web < Roda
 						end
 
 						r.post do
-							customer_repo(sgx_repo: Bwmsgsv2Repo.new)
-								.find_by_tel(params["to"])
-								.then { |c|
-									EMPromise.all([c, c.ogm(params["from"])])
-								}.then do |(customer, ogm)|
-									render :voicemail, locals: {
-										ogm: ogm,
-										transcription_enabled: customer.transcription_enabled
-									}
-								end
+							find_by_tel_with_fallback(
+								sgx_repo: Bwmsgsv2Repo.new,
+								ogm_url: nil
+							).then { |c|
+								c.ogm(params["from"])
+							}.then { |ogm|
+								render :voicemail, locals: { ogm: ogm }
+							}
 						end
 					end