]> source.dussan.org Git - redmine.git/commitdiff
WARNING: Can't mass-assign protected attributes: user_id, type.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 14 Jul 2014 16:21:17 +0000 (16:21 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 14 Jul 2014 16:21:17 +0000 (16:21 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13330 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project.rb

index a146a344a59414666e8dc8295a862676ec60ca55..96de855172ae9550cc09968b97212b9e520a656d 100644 (file)
@@ -948,7 +948,7 @@ class Project < ActiveRecord::Base
   def copy_queries(project)
     project.queries.each do |query|
       new_query = IssueQuery.new
-      new_query.attributes = query.attributes.dup.except("id", "project_id", "sort_criteria")
+      new_query.attributes = query.attributes.dup.except("id", "project_id", "sort_criteria", "user_id", "type")
       new_query.sort_criteria = query.sort_criteria if query.sort_criteria
       new_query.project = self
       new_query.user_id = query.user_id