##// END OF EJS Templates
Fixed: Error when editing the wokflow after deleting a status...
Jean-Philippe Lang -
r581:98cf33070fc2
parent child
Show More
@@ -39,7 +39,7 class IssueStatus < ActiveRecord::Base
39 # Uses association cache when called more than one time
39 # Uses association cache when called more than one time
40 def new_statuses_allowed_to(role, tracker)
40 def new_statuses_allowed_to(role, tracker)
41 new_statuses = workflows.select {|w| w.role_id == role.id && w.tracker_id == tracker.id}.collect{|w| w.new_status} if role && tracker
41 new_statuses = workflows.select {|w| w.role_id == role.id && w.tracker_id == tracker.id}.collect{|w| w.new_status} if role && tracker
42 new_statuses ? new_statuses.sort{|x, y| x.position <=> y.position } : []
42 new_statuses ? new_statuses.compact.sort{|x, y| x.position <=> y.position } : []
43 end
43 end
44
44
45 # Same thing as above but uses a database query
45 # Same thing as above but uses a database query
General Comments 0
You need to be logged in to leave comments. Login now