From 3c218e3c9aef89e27e7b1f8e202dfec887d691d7 Mon Sep 17 00:00:00 2001 From: Phil Lee Date: Wed, 2 Oct 2024 11:44:13 +0100 Subject: [PATCH] add guard to prevent csv failure --- app/models/payroll/payment_csv_row.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/payroll/payment_csv_row.rb b/app/models/payroll/payment_csv_row.rb index 5854942a32..caa2d63833 100644 --- a/app/models/payroll/payment_csv_row.rb +++ b/app/models/payroll/payment_csv_row.rb @@ -111,6 +111,8 @@ def has_student_loan end def student_loan_plan + return if model.student_loan_plan.blank? + model.student_loan_plan.gsub("plan", "").humanize end