aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/StartupController.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-22 17:05:44 +0000
committerGitHub <noreply@github.com>2021-03-22 17:05:44 +0000
commit5d16d1f66de499022da3eeb484a2cdfe341bed2f (patch)
treeac348fc960f2c849d989a6d2f27a34a73d4f3675 /Jellyfin.Api/Controllers/StartupController.cs
parent7fa525c83b7573e61124fa1c64a3b27569e66b6d (diff)
parent0853d1265c99a2e8614aa0c7a584dff541484e19 (diff)
Merge branch 'master' into RemoteAccessFix
Diffstat (limited to 'Jellyfin.Api/Controllers/StartupController.cs')
-rw-r--r--Jellyfin.Api/Controllers/StartupController.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/StartupController.cs b/Jellyfin.Api/Controllers/StartupController.cs
index d9cb34557..a01a617fc 100644
--- a/Jellyfin.Api/Controllers/StartupController.cs
+++ b/Jellyfin.Api/Controllers/StartupController.cs
@@ -132,7 +132,10 @@ namespace Jellyfin.Api.Controllers
{
var user = _userManager.Users.First();
- user.Username = startupUserDto.Name;
+ if (startupUserDto.Name != null)
+ {
+ user.Username = startupUserDto.Name;
+ }
await _userManager.UpdateUserAsync(user).ConfigureAwait(false);