From 342605d708e66e69980f0b2c50105e54b38586f1 Mon Sep 17 00:00:00 2001 From: Jeremy Friesen Date: Thu, 21 Dec 2023 14:30:50 -0500 Subject: [PATCH] Stab at trying to find a problem --- app/models/user.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index 4a1beb3ab..5146e3b30 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -115,6 +115,8 @@ def groups # @return [Array] Hyrax::Group names the User is a member of def hyrax_group_names groups + rescue NoMethodError + raise "Hyrax::Groups: #{roles.where(name: 'member', resource_type: 'Hyrax::Group').map(&:resource).inspect}\nRoles: #{roles.all.inspect}" end # TODO: this needs tests and to be moved to the service