Fix error code when opening an invalid group order
This commit is contained in:
parent
bce9d9a8c2
commit
7d112516a1
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ class GroupOrdersController < ApplicationController
|
|||
end
|
||||
|
||||
def ensure_my_group_order
|
||||
@group_order = GroupOrder.find_by_id(params[:id])
|
||||
@group_order = GroupOrder.find(params[:id])
|
||||
if @group_order.ordergroup != @ordergroup && (@group_order.ordergroup || !current_user.role_orders?)
|
||||
redirect_to group_orders_url, alert: I18n.t('group_orders.errors.notfound')
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue