[open-ils-commits] r13308 - trunk/Open-ILS/src/perlmods/OpenILS/Application (erickson)

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


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

Modified:
   trunk/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: trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2009-06-03 17:16:30 UTC (rev 13307)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	2009-06-03 17:51:55 UTC (rev 13308)
@@ -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