summaryrefslogtreecommitdiffstats
path: root/test/object_helpers.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2021-04-01 14:48:50 +0000
committerGo MAEDA <maeda@farend.jp>2021-04-01 14:48:50 +0000
commite86476eb5be8abbabba60e0c9a34f4a50fafcfb9 (patch)
tree387b00490db631ccd077e621cb364c4f41c4fb09 /test/object_helpers.rb
parentf1b1c2f4712e089d9a00310f24d54c672f707235 (diff)
downloadredmine-e86476eb5be8abbabba60e0c9a34f4a50fafcfb9.tar.gz
redmine-e86476eb5be8abbabba60e0c9a34f4a50fafcfb9.zip
Fix "ActiveRecord::StaleObjectError: Attempted to update a stale object: Issue." (#29914, #32912).
Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@20884 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r--test/object_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb
index e89e1bd05..3900bc45d 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -105,7 +105,7 @@ module ObjectHelpers
def Issue.generate!(attributes={}, &block)
issue = Issue.generate(attributes, &block)
issue.save!
- issue
+ issue.reload
end
# Generates an issue with 2 children and a grandchild