[open-ils-commits] r8958 - branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Utils

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 11 01:22:59 EDT 2008


Author: miker
Date: 2008-03-11 00:49:50 -0400 (Tue, 11 Mar 2008)
New Revision: 8958

Modified:
   branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
Log:
the id field may not be called "id" ... use the Identity method to find out the correct name

Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm	2008-03-11 01:01:15 UTC (rev 8957)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm	2008-03-11 04:49:50 UTC (rev 8958)
@@ -416,7 +416,8 @@
 	    $self->log(I, "checking perms user=$uid, org=$org, perm=$perm");
     
         if($object) {
-            my $params = [$perm, $object->json_hint, $object->id];
+            my $id_field = $object->Identity;
+            my $params = [$perm, $object->json_hint, $object->$id_field];
             push(@$params, $org) if $org;
             $OBJECT_PERM_QUERY->{select}->{au}->[0]->{params} = $params;
             $OBJECT_PERM_QUERY->{where}->{id} = $uid;



More information about the open-ils-commits mailing list