Hi,

The attached patch eliminates the following message that we see in our logs:

/openils/var/log/open-ils.actor_unix.log:Argument "" isn't numeric in numeric eq (==) at /openils/lib/perl5/OpenILS/Application/AppUtils.pm line 281.

The patch is so trivial that I don't think a DCO would be necessary.

Jason Stephenson
MVLC
Index: Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm
===================================================================
--- Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	(revision 16239)
+++ Open-ILS/src/perlmods/OpenILS/Application/AppUtils.pm	(working copy)
@@ -276,7 +276,8 @@
 			$org->ou_type( $org_typelist_hash->{$org->ou_type()});
 		}
 
-		next unless (defined($org->parent_ou));
+        # undef or DBD::Pg nulls turn into empty strings in JSON:
+		next if (!defined($org->parent_ou) || $org->parent_ou eq "");
 
 		my ($parent) = grep { $_->id == $org->parent_ou } @list;
 		next unless $parent;

Reply via email to