diff options
author | James Lopez <james@jameslopez.es> | 2016-11-17 20:54:02 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 20:54:02 +0100 |
commit | 24c2aa39ad0f55321ef2c28ce10d740bf6b78980 (patch) | |
tree | 86f48daed9a1fd89228fc9d08eec1847d71d6057 /lib | |
parent | 98773ef9745ae64da953a62fd4fbcbf290a37ea7 (diff) | |
download | gitlab-ce-24c2aa39ad0f55321ef2c28ce10d740bf6b78980.tar.gz |
fix blank state error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/cycle_analytics/base_event.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/cycle_analytics/base_event.rb b/lib/gitlab/cycle_analytics/base_event.rb index 7395561a3fc..cedc73142fa 100644 --- a/lib/gitlab/cycle_analytics/base_event.rb +++ b/lib/gitlab/cycle_analytics/base_event.rb @@ -12,7 +12,7 @@ module Gitlab end def fetch - update_author! if event_result.first['author_id'] + update_author! event_result.map do |event| serialize(event) if has_permission?(event['id']) @@ -28,6 +28,8 @@ module Gitlab private def update_author! + return unless event_result.any? && event_result.first['author_id'] + AuthorUpdater.update!(event_result) end |