From 70602a8934d82127110cbaaf08fe75bd03c1cd1c Mon Sep 17 00:00:00 2001 From: pancakes Date: Sat, 29 Mar 2025 21:52:57 +1000 Subject: [PATCH] [backend/api] Set pronouns to null if new pronouns value is empty --- Iceshrimp.Backend/Controllers/Web/ProfileController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceshrimp.Backend/Controllers/Web/ProfileController.cs b/Iceshrimp.Backend/Controllers/Web/ProfileController.cs index 760826c5..45ffcc42 100644 --- a/Iceshrimp.Backend/Controllers/Web/ProfileController.cs +++ b/Iceshrimp.Backend/Controllers/Web/ProfileController.cs @@ -76,7 +76,7 @@ public class ProfileController( profile.Birthday = birthday; profile.Fields = fields.ToArray(); profile.FFVisibility = (UserProfile.UserProfileFFVisibility)newProfile.FFVisibility; - profile.Pronouns = newProfile.Pronouns; + profile.Pronouns = newProfile.Pronouns.Count != 0 ? newProfile.Pronouns : null; user.DisplayName = string.IsNullOrWhiteSpace(newProfile.DisplayName) ? null : newProfile.DisplayName.Trim();