From 39efd3a9d5e650098201930eecff3fb493cc0917 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 18 Aug 2010 18:08:17 +0000 Subject: [PATCH] money_open_user_summary may not exist if the user has no transactions to summarize. protect against null summary object git-svn-id: svn://svn.open-ils.org/ILS/trunk@17253 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm index 81524a0fb..137f539c7 100644 --- a/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm +++ b/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm @@ -230,7 +230,7 @@ sub fee_amount { my $summary = $e->retrieve_money_open_user_summary($user_id); $e->rollback; # xact_rollback + disconnect - my $total = $summary->balance_owed; + my $total = ($summary) ? $summary->balance_owed : 0; syslog('LOG_INFO', "User ".$self->{id} .":$user_id has a fee amount of \$$total"); return $total; } -- 2.11.0