Commit b861bf2b authored by Gualter's avatar Gualter

Removing subcategory for reviewers on events_controller (#213 #214)

parent 6d12ca32
......@@ -17,9 +17,9 @@ class EventsController < ApplicationController
result = nil
if @current_user_is_reviewer
result = search @prefiltered_events.includes(:track, :subcategory), params
result = search @prefiltered_events.includes(:track), params
else
result = search @prefiltered_events.includes(:track, :subcategory), params
result = search @prefiltered_events.includes(:track), params
end
@events = result.to_a.uniq
......@@ -53,7 +53,7 @@ class EventsController < ApplicationController
result = nil
if @current_user_is_reviewer
result = search @prefiltered_events.includes(:event_ratings, :subcategory, :review_reservations), params
result = search @prefiltered_events.includes(:event_ratings, :review_reservations), params
else
result = search @prefiltered_events.includes(:event_ratings).where(event_ratings: {person: @current_user.person, event_rating_type: 'expert_review'}), params
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment