diff options
Diffstat (limited to 'lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb')
-rw-r--r-- | lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb b/lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb index dd8149aba94..41f94e79f91 100644 --- a/lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb +++ b/lib/gitlab/analytics/cycle_analytics/aggregated/base_query_builder.rb @@ -24,7 +24,7 @@ module Gitlab def initialize(stage:, params: {}) @stage = stage @params = params - @root_ancestor = stage.parent.root_ancestor + @root_ancestor = stage.namespace.root_ancestor @stage_event_model = MODEL_CLASSES.fetch(stage.subject_class.to_s) end @@ -90,7 +90,7 @@ module Gitlab end def filter_by_stage_parent(query) - query.by_project_id(stage.parent_id) + query.by_project_id(stage.namespace.project.id) end def base_query |