diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-20 21:10:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-20 21:10:05 +0300 |
commit | cc4e1c884cd6b8782fb6a247d840a2d1c7f4603e (patch) | |
tree | 8a54c659b82873efafe04887708140785caea153 /app/models/packages | |
parent | 709948b7a69597b1efe24df9b0f388cc0b493dd9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/packages')
-rw-r--r-- | app/models/packages/debian/file_metadatum.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/packages/debian/file_metadatum.rb b/app/models/packages/debian/file_metadatum.rb index af51f256e18..eb1b03a8e9d 100644 --- a/app/models/packages/debian/file_metadatum.rb +++ b/app/models/packages/debian/file_metadatum.rb @@ -13,10 +13,11 @@ class Packages::Debian::FileMetadatum < ApplicationRecord } validates :file_type, presence: true - validates :file_type, inclusion: { in: %w[unknown] }, if: -> { package_file&.package&.debian_incoming? } + validates :file_type, inclusion: { in: %w[unknown] }, + if: -> { package_file&.package&.debian_incoming? || package_file&.package&.processing? } validates :file_type, inclusion: { in: %w[source dsc deb udeb buildinfo changes] }, - if: -> { package_file&.package&.debian_package? } + if: -> { package_file&.package&.debian_package? && !package_file&.package&.processing? } validates :component, presence: true, |