Skip to content

Commit 08b0a8c

Browse files
committed
Fix bug
1 parent 381b592 commit 08b0a8c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/controllers/organizations_controller.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ def percent_completed_hash(courses, user)
127127
end
128128

129129
def set_organization
130-
@organization = Organization.find_by(slug: params[:id])
130+
@organization = Organization.find_by!(slug: params[:id])
131131
unauthorized! unless @organization.visibility_allowed?(request, current_user)
132-
raise ActiveRecord::RecordNotFound, 'Invalid organization id' if @organization.nil?
133132
end
134133

135134
def organization_params

0 commit comments

Comments
 (0)