diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-10-25 19:12:12 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-10-25 19:20:23 +0300 |
commit | 7a525004a7c9fa7b5a4d11ec5f8bf7854519178c (patch) | |
tree | 5d5110d96c7cf1fb3e1fce6de63b6066e31b4528 /app | |
parent | 9e6098a6db3fd99f1c156b81598476b9df286f60 (diff) |
Preload user status for label events
This makes sure the user_status for the user of a label event is
preloaded. Otherwise it would not be rendered in the fake system note.
Diffstat (limited to 'app')
-rw-r--r-- | app/services/resource_events/merge_into_notes_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/resource_events/merge_into_notes_service.rb b/app/services/resource_events/merge_into_notes_service.rb index 596c0105ea0..7504773a002 100644 --- a/app/services/resource_events/merge_into_notes_service.rb +++ b/app/services/resource_events/merge_into_notes_service.rb @@ -34,7 +34,7 @@ module ResourceEvents def label_events_by_discussion_id return [] unless resource.respond_to?(:resource_label_events) - events = resource.resource_label_events.includes(:label, :user) + events = resource.resource_label_events.includes(:label, user: :status) events = since_fetch_at(events) events.group_by { |event| event.discussion_id } |