removing required for last.fm username, fixed handling of empty usernames

This commit is contained in:
andy 2021-12-05 00:29:38 +00:00
parent 3b860fc971
commit ecf79f146a

View File

@ -33,7 +33,6 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage
public class InputModel
{
[Required]
[Display(Name = "Username")]
public string Username { get; set; }
}
@ -76,7 +75,7 @@ namespace Selector.Web.Areas.Identity.Pages.Account.Manage
if (Input.Username != user.LastFmUsername)
{
user.LastFmUsername = Input.Username.Trim();
user.LastFmUsername = Input.Username?.Trim();
await _userManager.UpdateAsync(user);
StatusMessage = "Username changed";