[open-ils-commits] r17253 - trunk/Open-ILS/src/perlmods/OpenILS/SIP (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Aug 18 14:08:21 EDT 2010
Author: erickson
Date: 2010-08-18 14:08:17 -0400 (Wed, 18 Aug 2010)
New Revision: 17253
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm
Log:
money_open_user_summary may not exist if the user has no transactions to summarize. protect against null summary object
Modified: trunk/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm 2010-08-18 17:41:22 UTC (rev 17252)
+++ trunk/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm 2010-08-18 18:08:17 UTC (rev 17253)
@@ -230,7 +230,7 @@
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;
}
More information about the open-ils-commits
mailing list