tweak to allow OpenAthens to retreive OU name
authorChris Sharp <csharp@georgialibraries.org>
Mon, 26 Apr 2021 19:06:46 +0000 (15:06 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Mon, 26 Apr 2021 19:06:46 +0000 (15:06 -0400)
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/OpenAthens.pm

index 4a5af93..bc6e2f6 100644 (file)
@@ -320,9 +320,9 @@ sub _get_openathens_session_initiator_url {
 
     my $ou_id = $user->home_ou;
     if ($ou_id && $U->is_true($openathens_config->{release_home_ou})) {
-        my $ou = $ctx->{get_aou}->($ou_id);
-        if ($ou) {
-            $request_obj->{attributes}->{OA_ATTR_HOME_OU} = $ou->shortname;
+        my $ou_name = $ctx->{get_aou}->($ou_id)->shortname;
+        if ($ou_name) {
+            $request_obj->{attributes}->{OA_ATTR_HOME_OU} = $ou_name;
         }
     }