Check for null in RfC question
This commit is contained in:
@ -8,7 +8,7 @@ class RequestForCommentPolicy < ApplicationPolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show?
|
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
|
end
|
||||||
|
|
||||||
def destroy?
|
def destroy?
|
||||||
|
Reference in New Issue
Block a user