diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-11 12:08:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-11 12:08:10 +0000 |
commit | b86f474bf51e20d2db4cf0895d0a8e0894e31c08 (patch) | |
tree | 061d2a4c749924f5a35fe6199dd1d8982c4b0b27 /app/models/project.rb | |
parent | 6b8040dc25fdc5fe614c3796a147517dd50bc7d8 (diff) | |
download | gitlab-ce-b86f474bf51e20d2db4cf0895d0a8e0894e31c08.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 1cf69bf8403..84289e1d5ac 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -97,8 +97,11 @@ class Project < ApplicationRecord unless: :ci_cd_settings, if: proc { ProjectCiCdSetting.available? } + after_create :create_container_expiration_policy, + unless: :container_expiration_policy + after_create :create_pages_metadatum, - unless: :pages_metadatum + unless: :pages_metadatum after_create :set_timestamps_for_create after_update :update_forks_visibility_level @@ -248,6 +251,7 @@ class Project < ApplicationRecord # which is not managed by the DB. Hence we're still using dependent: :destroy # here. has_many :container_repositories, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent + has_one :container_expiration_policy, inverse_of: :project has_many :commit_statuses # The relation :all_pipelines is intended to be used when we want to get the @@ -305,6 +309,7 @@ class Project < ApplicationRecord accepts_nested_attributes_for :import_data accepts_nested_attributes_for :auto_devops, update_only: true accepts_nested_attributes_for :ci_cd_settings, update_only: true + accepts_nested_attributes_for :container_expiration_policy, update_only: true accepts_nested_attributes_for :remote_mirrors, allow_destroy: true, |