Skip to content

Commit

Permalink
Fix for change in API
Browse files Browse the repository at this point in the history
  • Loading branch information
eanders committed Sep 23, 2024
1 parent 4c799d2 commit 1df1d27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/warehouse/referral_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ def accepted

def rejected
reason = client_opportunity_match.unsuccessful_reason
unsuccessful_decision = client_opportunity_match.unsuccessful_decision
closed_timestamp = unsuccessful_decision&.updated_at || client_opportunity_match.updated_at
if reason&.referral_result.present?
update(referral_result: reason.referral_result, referral_result_date: reason.referral_result_date)
update(referral_result: reason.referral_result, referral_result_date: closed_timestamp)
else
destroy
end
Expand Down

0 comments on commit 1df1d27

Please sign in to comment.