[open-ils-commits] [GIT] Evergreen ILS branch master updated. f31ae28b754ee8c16131ad1cab63c267bc96d80c

Evergreen Git git at git.evergreen-ils.org
Tue Jul 19 16:35:12 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  f31ae28b754ee8c16131ad1cab63c267bc96d80c (commit)
      from  8585968565f1c437d517fda73bd19d82b37d90f6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f31ae28b754ee8c16131ad1cab63c267bc96d80c
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Sun Jul 17 20:28:14 2011 -0400

    Make inactive cards/patrons "not exist" via SIP2
    
    And make sure if we do get a deleted patron for some reason they are ignored too.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
index c3dbb21..17389fa 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
@@ -85,7 +85,7 @@ sub new {
 
         my $card = $e->search_actor_card([{barcode => $patron_id}, $usr_flesh])->[0];
 
-        if(!$card) {
+        if(!$card or !$U->is_true($card->active)) {
             syslog("LOG_WARNING", "No such patron barcode: $patron_id");
             return undef;
         }
@@ -96,11 +96,16 @@ sub new {
 	    $user = $e->retrieve_actor_user([$patron_id, $usr_flesh]);
     }
 
-    if(!$user) {
+    if(!$user or $U->is_true($user->deleted)) {
         syslog("LOG_WARNING", "OILS: Unable to find patron %s => %s", $key, $patron_id);
         return undef;
     }
 
+    if(!$U->is_true($user->active)) {
+        syslog("LOG_WARNING", "OILS: Patron is inactive %s => %s", $key, $patron_id);
+        return undef;
+    }
+
     # now grab the user's penalties
 
     $self->flesh_user_penalties($user, $e) unless $args{slim_user};

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list