修复:更新无法设置空值

This commit is contained in:
2023-02-20 18:22:14 +08:00
parent 4657618753
commit 02526878fe
4 changed files with 13 additions and 8 deletions
+5 -5
View File
@@ -84,12 +84,12 @@ class Api::V1::Issues::UpdateService < ApplicationService
def issue_load_attributes
@updated_issue.status_id = status_id if status_id.present?
@updated_issue.priority_id = priority_id if priority_id.present?
@updated_issue.fixed_version_id = milestone_id if milestone_id.present?
@updated_issue.branch_name = branch_name if branch_name.present?
@updated_issue.start_date = start_date if start_date.present?
@updated_issue.due_date = due_date if due_date.present?
@updated_issue.fixed_version_id = milestone_id unless milestone_id.nil?
@updated_issue.branch_name = branch_name unless branch_name.nil?
@updated_issue.start_date = start_date unless start_date.nil?
@updated_issue.due_date = due_date unless due_date.nil?
@updated_issue.subject = subject if subject.present?
@updated_issue.description = description if description.present?
@updated_issue.description = description unless description.nil?
end
def build_assigner_participants