Merge pull request #4186 from shaktikatare1989/suspention-details-in-log

Fix: Suspensions and Blocks do not give enough details in logs
This commit is contained in:
Arpit Jalan 2016-04-21 09:00:36 +05:30
commit e7d1fa8120
1 changed files with 3 additions and 1 deletions

View File

@ -225,13 +225,15 @@ module Jobs
elsif attr == 'staff_user' elsif attr == 'staff_user'
user = User.find_by(id: staff_action.attributes['acting_user_id']) user = User.find_by(id: staff_action.attributes['acting_user_id'])
user.username if !user.nil? user.username if !user.nil?
elsif attr == 'subject'
user = User.find_by(id: staff_action.attributes['target_user_id'])
user.nil? ? staff_action.attributes[attr] : "#{user.username} #{staff_action.attributes[attr]}"
else else
staff_action.attributes[attr] staff_action.attributes[attr]
end end
staff_action_array.push(data) staff_action_array.push(data)
end end
staff_action_array staff_action_array
end end