[backend/api] Set pronouns to null if new pronouns value is empty
This commit is contained in:
parent
752dccd21e
commit
70602a8934
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ public class ProfileController(
|
||||||
profile.Birthday = birthday;
|
profile.Birthday = birthday;
|
||||||
profile.Fields = fields.ToArray();
|
profile.Fields = fields.ToArray();
|
||||||
profile.FFVisibility = (UserProfile.UserProfileFFVisibility)newProfile.FFVisibility;
|
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();
|
user.DisplayName = string.IsNullOrWhiteSpace(newProfile.DisplayName) ? null : newProfile.DisplayName.Trim();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue