Skip to content

Commit

Permalink
Update review_queues_controller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed May 18, 2018
1 parent 8460ac4 commit 964e5fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/review_queues_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def submit
@item = ReviewItem.find params[:item_id]

# Prevent the same item from being reviewed after it is completed, or twice by the same user.
if (@item.completed && ReviewResult.where(item: item).where.not(result: 'skip').exists?) ||
if (@item.completed && ReviewResult.where(item: @item).where.not(result: 'skip').exists?) ||
ReviewResult.where(user: current_user, item: @item).where.not(result: 'skip').exists?

render json: { status: 'duplicate' }, status: 409
Expand Down

0 comments on commit 964e5fa

Please sign in to comment.