]> source.dussan.org Git - redmine.git/commitdiff
avoid comparing a variable with multiple items at WorkflowTransition#replace_transitions
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 3 Jul 2020 11:12:14 +0000 (11:12 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 3 Jul 2020 11:12:14 +0000 (11:12 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19846 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/workflow_transition.rb

index 5c3051690f6060ad21d881c9a37dabb27dc12042..4a525f2601a71b9bd44eb372c583d7088c47b20d 100644 (file)
@@ -50,7 +50,7 @@ class WorkflowTransition < WorkflowRule
                 end
                 w = w.first
 
-                if transition == "1" || transition == true
+                if ["1", true].include?(transition)
                   unless w
                     w = WorkflowTransition.
                           new(