From 7bf9712ad6fa2840446412f4a8b668d6416c87ff Mon Sep 17 00:00:00 2001 From: Chris Beer Date: Mon, 13 May 2024 14:17:55 -0700 Subject: [PATCH] Apparently patron groups are optional in FOLIO --- app/models/folio/patron.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/folio/patron.rb b/app/models/folio/patron.rb index a6c6288f4..423425cf6 100644 --- a/app/models/folio/patron.rb +++ b/app/models/folio/patron.rb @@ -40,12 +40,12 @@ def username def patron_group_id # FOLIO APIs return a UUID here - user_info.fetch('patronGroup') + user_info['patronGroup'] end # this returns the full patronGroup object def patron_group - Folio::Types.patron_groups[patron_group_id] + Folio::Types.patron_groups[patron_group_id] if patron_group_id end def patron_group_name