Fix: Suspensions and Blocks do not give enough details in logs

This commit is contained in:
shakti katare 2016-04-19 18:02:01 +05:30
parent 46487f095e
commit cd4c34204d

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