修复:操作日志兼容旧数据负责人指派

This commit is contained in:
yystopf 2023-03-10 18:09:17 +08:00
parent 6f7b40ec24
commit 9c5d1e2900
1 changed files with 4 additions and 0 deletions

View File

@ -121,6 +121,10 @@ class Journal < ApplicationRecord
old_value = detail.old_value
new_value = detail.value
content += "结束日期"
when 'assigned_to_id'
old_value = User.find_by_id(detail.old_value)&.nickname
new_value = User.find_by_id(detail.value)&.nickname
content += "负责人"
end
if old_value.nil? || old_value.blank?
content += "设置为<b>#{new_value}</b>"