Skip to content

Commit

Permalink
Fix bug when reservation is a cross core one
Browse files Browse the repository at this point in the history
  • Loading branch information
LeticiaErrandonea committed Jun 12, 2024
1 parent 9ca523b commit 8805a7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/problem_reservations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ def problem_reservation_resolver
end

def load_and_authorize_reservation
@reservation = current_user.reservations.find(params[:id])
@reservation = if SettingsHelper.feature_on?(:cross_core_projects) && params[:redirect_to_order_id].present?
Reservation.find(params[:id])
else
current_user.reservations.find(params[:id])
end

@order_detail = @reservation.order_detail

raise ActiveRecord::RecordNotFound unless editable? || resolved?
Expand Down

0 comments on commit 8805a7c

Please sign in to comment.