don't fail module api PUT when position doesn't change

test plan:
 - enable draft state
 - go to modules page
 - publish a module and ensure the cloud icon changes
 - unpublish a module and ensure it changes back, without
   having to reload the page
 - repeat the two previous steps a couple of times

fixes CNVS-10829

Change-Id: I0806a29ccb9d1ff8e37e31e26e6eb39b3aa90fac
Reviewed-on: https://gerrit.instructure.com/29555
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
This commit is contained in:
Jeremy Stanley 2014-02-03 16:19:40 -07:00
parent 30ac87c5d3
commit 56dd02c8a1
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ module ActiveRecord
return unless in_scope?
return move_to_top if position == :top
current_position = self.position
return if in_list? && position == current_position
return true if in_list? && position == current_position
transaction do
if in_list?
if position < current_position