diff --git a/app/policies/request_for_comment_policy.rb b/app/policies/request_for_comment_policy.rb index 05033ffe..43d2e8de 100644 --- a/app/policies/request_for_comment_policy.rb +++ b/app/policies/request_for_comment_policy.rb @@ -8,7 +8,7 @@ class RequestForCommentPolicy < ApplicationPolicy end def show? - admin? || teacher_in_study_group? || author? || everyone && @record.question.exclude?('#loesung') + admin? || teacher_in_study_group? || author? || everyone && @record.question&.exclude?('#loesung') end def destroy?