From f43b70aeea914c14fe61d375fc2c288252ed30fa Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Thu, 25 Jul 2024 08:58:00 +0200 Subject: [PATCH] Fixes #37681 - sort content types in ACS error message --- app/models/katello/alternate_content_source.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/katello/alternate_content_source.rb b/app/models/katello/alternate_content_source.rb index e9e7ac64a4f..57fbdbdca9f 100644 --- a/app/models/katello/alternate_content_source.rb +++ b/app/models/katello/alternate_content_source.rb @@ -54,7 +54,7 @@ class AlternateContentSource < Katello::Model validates :content_type, inclusion: { in: ->(_) { RepositoryTypeManager.defined_repository_types.keys & CONTENT_TYPES }, allow_blank: false, - message: ->(_, _) { _("is not allowed for ACS. Must be one of the following: %s") % (RepositoryTypeManager.defined_repository_types.keys & CONTENT_TYPES).join(',') } + message: ->(_, _) { _("is not allowed for ACS. Must be one of the following: %s") % (RepositoryTypeManager.defined_repository_types.keys & CONTENT_TYPES).sort.join(',') } } validates :content_type, if: -> { rhui? }, inclusion: { in: [::Katello::Repository::YUM_TYPE],