Defect #32912

Rails 6: update no longer bypass optimistic locking

Added by Pavel Rosický over 1 year ago. Updated 7 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Rails support
Target version:-
Resolution:Fixed Affected version:

Description

fixes test failures

 ActiveRecord::StaleObjectError: Attempted to update a stale object: Issue.
    app/models/issue.rb:214:in `create_or_update'

https://github.com/rails/rails/commit/c14e1611e94a7461f219b4349e926592e65241ad

stale.patch Magnifier (3.19 KB) Pavel Rosický, 2020-01-29 00:35


Related issues

Related to Redmine - Feature #29914: Migrate to Rails 6.1 New

Associated revisions

Revision 20884
Added by Go MAEDA 7 months ago

Fix "ActiveRecord::StaleObjectError: Attempted to update a stale object: Issue." (#29914, #32912).

Patch by Pavel Rosický.

History

#1 Updated by Pavel Rosický over 1 year ago

I'm not sure about test_copy_should_not_copy_subtasks_twice_when_saving_twice which was introduced in https://github.com/redmine/redmine/commit/5003927f13f54850ca9eeac48e353df5e4e325a1

it should be probably refactored in order to reflect the new behaviour or confirm if it's still valid

#2 Updated by Marius BALTEANU over 1 year ago

#3 Updated by Go MAEDA over 1 year ago

  • Category set to Rails support

#4 Updated by Marius BALTEANU 7 months ago

  • Tracker changed from Patch to Defect

#5 Updated by Go MAEDA 7 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed as a part of #29914.

Also available in: Atom PDF