Fixed so revision only is reused if a *new* revision has been created after the lock. #615

This commit is contained in:
COLA@Redmine.local 2017-02-13 21:21:48 +01:00
parent b90e2983e8
commit c3ae2a35e6

View File

@ -745,7 +745,8 @@ private
next if lock.expired?
# lock should be exclusive but just in case make sure we find this users lock
next if lock.user != User.current
if lock.revision != file.last_revision.id
if lock.revision < file.last_revision.id
# At least one new revision has been created since the lock was created, reuse that revision.
return true
end
end