diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-10 20:41:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-10 20:41:15 +0300 |
commit | 3abfe4afb90054d7b8af276775e528551a4a5a32 (patch) | |
tree | ef93a2a7711da0e3666b84a8c2e6ae11301c569e /app/models | |
parent | 26dd7eec86080ea304eae663500455b96bbcfa1b (diff) |
Add latest changes from gitlab-org/gitlab@16-2-stable-ee
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/enums/sbom.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/concerns/enums/sbom.rb b/app/models/concerns/enums/sbom.rb index 3ba911dbcc5..59aafc32d94 100644 --- a/app/models/concerns/enums/sbom.rb +++ b/app/models/concerns/enums/sbom.rb @@ -26,7 +26,9 @@ module Enums end def self.purl_types - PURL_TYPES + # return 0 by default if the purl_type is not found, to prevent + # consumers from producing invalid SQL caused by null entries + @_purl_types ||= PURL_TYPES.dup.tap { |h| h.default = 0 } end end end |