Skip to content

Commit

Permalink
Merge pull request #2466 from sul-dlss/patronGroup
Browse files Browse the repository at this point in the history
Apparently patron groups are optional in FOLIO
  • Loading branch information
jcoyne authored May 14, 2024
2 parents 54d4e1b + 7bf9712 commit bc2b0f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/folio/patron.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bc2b0f0

Please sign in to comment.