Fixed an error when trying to delete a project (versions/issues dependency)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@574 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ba1b857197
commit
7eb3b186c4
|
@ -20,11 +20,11 @@ class Project < ActiveRecord::Base
|
|||
STATUS_ACTIVE = 1
|
||||
STATUS_ARCHIVED = 9
|
||||
|
||||
has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC"
|
||||
has_many :members, :dependent => :delete_all, :include => :user, :conditions => "#{User.table_name}.status=#{User::STATUS_ACTIVE}"
|
||||
has_many :users, :through => :members
|
||||
has_many :custom_values, :dependent => :delete_all, :as => :customized
|
||||
has_many :issues, :dependent => :destroy, :order => "#{Issue.table_name}.created_on DESC", :include => [:status, :tracker]
|
||||
has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC"
|
||||
has_many :time_entries, :dependent => :delete_all
|
||||
has_many :queries, :dependent => :delete_all
|
||||
has_many :documents, :dependent => :destroy
|
||||
|
|
Loading…
Reference in New Issue