diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 11:43:02 +0300 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /app/models/packages | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'app/models/packages')
-rw-r--r-- | app/models/packages/composer/cache_file.rb | 4 | ||||
-rw-r--r-- | app/models/packages/helm/file_metadatum.rb | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/models/packages/composer/cache_file.rb b/app/models/packages/composer/cache_file.rb index ecd7596b989..5222101d171 100644 --- a/app/models/packages/composer/cache_file.rb +++ b/app/models/packages/composer/cache_file.rb @@ -9,15 +9,13 @@ module Packages mount_file_store_uploader Packages::Composer::CacheUploader - belongs_to :group, -> { where(type: 'Group') }, foreign_key: 'namespace_id' + belongs_to :group, -> { where(type: Group.sti_name) }, foreign_key: 'namespace_id' belongs_to :namespace validates :namespace, presence: true scope :with_namespace, ->(namespace) { where(namespace: namespace) } scope :with_sha, ->(sha) { where(file_sha256: sha) } - scope :expired, -> { where("delete_at <= ?", Time.current) } - scope :without_namespace, -> { where(namespace_id: nil) } end end end diff --git a/app/models/packages/helm/file_metadatum.rb b/app/models/packages/helm/file_metadatum.rb index 1771003d1f9..dfa4ab6df82 100644 --- a/app/models/packages/helm/file_metadatum.rb +++ b/app/models/packages/helm/file_metadatum.rb @@ -12,7 +12,7 @@ module Packages validates :channel, presence: true, - length: { maximum: 63 }, + length: { maximum: 255 }, format: { with: Gitlab::Regex.helm_channel_regex } validates :metadata, |