From 0b859db58ac9277281a5d8a263da16614437534f Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Thu, 12 Sep 2024 12:31:09 +0200 Subject: [PATCH] use separate accessors instead of checking field_format against list in CustomField#multi_value_possible? --- app/models/custom_field.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 19b625c91d7a..076d972709d4 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -268,6 +268,10 @@ def list? field_format == "list" end + def user? + field_format == "user" + end + def version? field_format == "version" end @@ -281,7 +285,7 @@ def boolean? end def multi_value_possible? - %w[version user list].include?(field_format) + version? || user? || list? end def allow_non_open_versions_possible?