From: erickson Date: Wed, 3 Jun 2009 17:55:48 +0000 (+0000) Subject: no need to warn when orgid is null in find_org(), that's not an uncommon occurrence... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=18cdab1e13fe9386c56fc9f6ccadca8d36110d9e;p=Evergreen.git no need to warn when orgid is null in find_org(), that's not an uncommon occurrence. just return undef git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4_0@13310 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm index 1d7895a013..020e9674d9 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm @@ -773,13 +773,7 @@ sub fetch_stat_cat_entry { sub find_org { my( $self, $org_tree, $orgid ) = @_; - if (!$org_tree) { - $logger->warn("find_org() did not receive a value for \$org_tree"); - return undef; - } elsif (!$orgid) { - $logger->warn("find_org() did not receive a value for \$orgid"); - return undef; - } + return undef unless $org_tree and defined $orgid; return $org_tree if ( $org_tree->id eq $orgid ); return undef unless ref($org_tree->children); for my $c (@{$org_tree->children}) {