Skip to content

Commit 464a438

Browse files
authored
[Governance] Handle transfer models without local_hcb_code method (#11981)
## Summary of the problem Closes #11980 ## Describe your changes We try to link to `local_hcb_code`. Otherwise, just link directly to the transfer. I think ideally we'd just link to the transfer's show page, but not all models (e.g. `IncreaseCheck` have a show page). Most models just redirect to the HcbCode anyways.
1 parent a5a24f1 commit 464a438

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/governance/admin/transfer/approval_attempt_mailer/report_denial.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<%= link_to @approval_attempt.user.name, admin_user_url(@approval_attempt.user) %>
77
(<%= @approval_attempt.user.email %>) attempted to approve a
8-
<%= link_to "#{@approval_attempt.attempted_amount.format} #{@approval_attempt.transfer_type}", @approval_attempt.transfer.local_hcb_code %>
8+
<%= link_to "#{@approval_attempt.attempted_amount.format} #{@approval_attempt.transfer_type}", @approval_attempt.transfer.try(:local_hcb_code) || @approval_attempt.transfer %>
99
but was denied for the following reason:
1010

1111
<blockquote>

0 commit comments

Comments
 (0)