diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-07-14 11:31:43 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-07-14 11:31:43 +0000 |
commit | 98cf33070fc28e8986aaf960923f58f8da15b9d4 (patch) | |
tree | 1522d80688cf3ed13a372b31c6717e164d37067a /app/models/issue_status.rb | |
parent | 5e20417e6d523372320861f1d9a446ddd75e041f (diff) | |
download | redmine-98cf33070fc28e8986aaf960923f58f8da15b9d4.tar.gz redmine-98cf33070fc28e8986aaf960923f58f8da15b9d4.zip |
Fixed: Error when editing the wokflow after deleting a status
git-svn-id: http://redmine.rubyforge.org/svn/trunk@584 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_status.rb')
-rw-r--r-- | app/models/issue_status.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index beb06f140..3bca612aa 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -39,7 +39,7 @@ class IssueStatus < ActiveRecord::Base # Uses association cache when called more than one time def new_statuses_allowed_to(role, tracker) new_statuses = workflows.select {|w| w.role_id == role.id && w.tracker_id == tracker.id}.collect{|w| w.new_status} if role && tracker - new_statuses ? new_statuses.sort{|x, y| x.position <=> y.position } : [] + new_statuses ? new_statuses.compact.sort{|x, y| x.position <=> y.position } : [] end # Same thing as above but uses a database query |