From 0d7db5dd45d82f598f17dbb3a6cb2dbada97a6fd Mon Sep 17 00:00:00 2001 From: Audrey Hamelers Date: Tue, 18 Jun 2024 18:54:27 +0200 Subject: [PATCH] fix bad stripe links --- app/helpers/stash_engine/admin_datasets_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/helpers/stash_engine/admin_datasets_helper.rb b/app/helpers/stash_engine/admin_datasets_helper.rb index 231ad912d2..7c8d15a577 100644 --- a/app/helpers/stash_engine/admin_datasets_helper.rb +++ b/app/helpers/stash_engine/admin_datasets_helper.rb @@ -34,7 +34,10 @@ def format_external_references(instring) return '' unless instring.present? # Stripe invoice references - return render inline: link_to(instring, "https://dashboard.stripe.com/invoices/#{instring}", target: :_blank) if instring.start_with?('in_') + if instring.start_with?('in_') && !instring.start_with?('in_progress') + return render inline: link_to(instring, "https://dashboard.stripe.com/invoices/#{instring}", + target: :_blank) + end # Turn salesforce references into hyperlinks matchdata = instring.match(/(.*)SF ?#? ?(\d+)(.*)/)