From: miker Date: Tue, 11 Mar 2008 04:49:50 +0000 (+0000) Subject: the id field may not be called "id" ... use the Identity method to find out the corre... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a904810b31e879ab2f531241a62195027fdbd064;p=Evergreen.git the id field may not be called "id" ... use the Identity method to find out the correct name git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8958 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm index c861f0d1da..a27196765e 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm @@ -416,7 +416,8 @@ sub allowed { $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;