Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/analytics/cycle_analytics/stage_event_hash.rb')
-rw-r--r--app/models/analytics/cycle_analytics/stage_event_hash.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/analytics/cycle_analytics/stage_event_hash.rb b/app/models/analytics/cycle_analytics/stage_event_hash.rb
index 0e1e9b3ef67..6443a970945 100644
--- a/app/models/analytics/cycle_analytics/stage_event_hash.rb
+++ b/app/models/analytics/cycle_analytics/stage_event_hash.rb
@@ -3,7 +3,7 @@
module Analytics
module CycleAnalytics
class StageEventHash < ApplicationRecord
- has_many :cycle_analytics_project_stages, class_name: 'Analytics::CycleAnalytics::ProjectStage', inverse_of: :stage_event_hash
+ has_many :cycle_analytics_stages, class_name: 'Analytics::CycleAnalytics::Stage', inverse_of: :stage_event_hash
validates :hash_sha256, presence: true
@@ -33,10 +33,10 @@ module Analytics
end
def self.unused_hashes_for(id)
- exists_query = Analytics::CycleAnalytics::ProjectStage.where(stage_event_hash_id: id).select('1').limit(1)
- where.not('EXISTS (?)', exists_query)
+ stage_exists_query = ::Analytics::CycleAnalytics::Stage.where(stage_event_hash_id: id).select('1').limit(1)
+
+ where.not('EXISTS (?)', stage_exists_query)
end
end
end
end
-Analytics::CycleAnalytics::StageEventHash.prepend_mod_with('Analytics::CycleAnalytics::StageEventHash')