From a2292d44ff2cc496e36633440c3d0cbdb1930e45 Mon Sep 17 00:00:00 2001 From: "Julien Tant (aider)" Date: Wed, 12 Feb 2025 14:43:14 -0700 Subject: [PATCH] feat: Add support for lowercase and title case keys in custom profile attributes map --- server/public/model/custom_profile_attributes.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/public/model/custom_profile_attributes.go b/server/public/model/custom_profile_attributes.go index 8839ad07b74..06e8263afe0 100644 --- a/server/public/model/custom_profile_attributes.go +++ b/server/public/model/custom_profile_attributes.go @@ -63,16 +63,26 @@ func NewCustomProfileAttributesSelectOptionFromMap(m map[string]any) CustomProfi name := "" color := "" + // Check for both "Name" and "name" if v, ok := m["Name"]; ok { if vStr, ok := v.(string); ok { name = vStr } + } else if v, ok := m["name"]; ok { + if vStr, ok := v.(string); ok { + name = vStr + } } + // Check for both "Color" and "color" if v, ok := m["Color"]; ok { if vStr, ok := v.(string); ok { color = vStr } + } else if v, ok := m["color"]; ok { + if vStr, ok := v.(string); ok { + color = vStr + } } return NewCustomProfileAttributesSelectOption(name, color)