From bc9ca5fcfd74ea699ea816aaf9e38edadd37b784 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 27 Jun 2015 09:02:24 +0000 Subject: Disallow users to delete a version referenced by a custom field (#20159). git-svn-id: http://svn.redmine.org/redmine/trunk@14376 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/object_helpers.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/object_helpers.rb') diff --git a/test/object_helpers.rb b/test/object_helpers.rb index 7061e75c1..74f82b68b 100644 --- a/test/object_helpers.rb +++ b/test/object_helpers.rb @@ -125,6 +125,7 @@ module ObjectHelpers @generated_version_name.succ! version = Version.new(attributes) version.name = @generated_version_name.dup if version.name.blank? + version.project ||= Project.find(1) yield version if block_given? version.save! version -- cgit v1.2.3