]> source.dussan.org Git - redmine.git/commitdiff
code layout clean up IssuesController#update_issue_from_params
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 22 Nov 2019 04:25:25 +0000 (04:25 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 22 Nov 2019 04:25:25 +0000 (04:25 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@19152 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb

index 1c3d8cec2ae069e1a13b8a59a28548ff2608e420..9829b124ef943e6cb4f066d8b2eb78b15550aaeb 100644 (file)
@@ -505,11 +505,11 @@ class IssuesController < ApplicationController
     if params[:time_entry]
       @time_entry.safe_attributes = params[:time_entry]
     end
-
     @issue.init_journal(User.current)
-
     issue_attributes = params[:issue]
-    issue_attributes[:assigned_to_id] = User.current.id if issue_attributes && issue_attributes[:assigned_to_id] == 'me'
+    if issue_attributes && issue_attributes[:assigned_to_id] == 'me'
+      issue_attributes[:assigned_to_id] = User.current.id
+    end
     if issue_attributes && params[:conflict_resolution]
       case params[:conflict_resolution]
       when 'overwrite'