[open-ils-commits] r13310 - branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jun 3 13:55:51 EDT 2009


Author: erickson
Date: 2009-06-03 13:55:48 -0400 (Wed, 03 Jun 2009)
New Revision: 13310

Modified:
   branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
Log:
no need to warn when orgid is null in find_org(), that's not an uncommon occurrence.  just return undef

Modified: branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
===================================================================
--- branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2009-06-03 17:55:36 UTC (rev 13309)
+++ branches/rel_1_4_0/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2009-06-03 17:55:48 UTC (rev 13310)
@@ -773,13 +773,7 @@
 
 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}) {



More information about the open-ils-commits mailing list