diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-14 18:07:55 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-14 18:07:55 +0300 |
commit | 85e494935a8726dc98bb19ffa584488420e5011e (patch) | |
tree | 5acf279dab81a2363e4504a9679c32c16510542b /app/models/deployment.rb | |
parent | 4ce0bee95df15c05cdb0d777eba31fe753bc443b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r-- | app/models/deployment.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb index 5a22a6ada9d..74cc7f93580 100644 --- a/app/models/deployment.rb +++ b/app/models/deployment.rb @@ -5,6 +5,7 @@ class Deployment < ApplicationRecord include IidRoutes include AfterCommitQueue include UpdatedAtFilterable + include Importable include Gitlab::Utils::StrongMemoize belongs_to :project, required: true @@ -17,7 +18,7 @@ class Deployment < ApplicationRecord has_many :merge_requests, through: :deployment_merge_requests - has_internal_id :iid, scope: :project, init: ->(s) do + has_internal_id :iid, scope: :project, track_if: -> { !importing? }, init: ->(s) do Deployment.where(project: s.project).maximum(:iid) if s&.project end |