aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/StartupController.cs
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2021-03-06 17:43:01 -0500
committerPatrick Barron <barronpm@gmail.com>2021-03-06 17:43:01 -0500
commitf638ee6b0918c2ef05ec11cfa43584d3efad68d1 (patch)
treed09920ded59a8773ffa84a056f49e7800240589c /Jellyfin.Api/Controllers/StartupController.cs
parent287dab4655176b09b0cd5b7607bfaff74e48d20d (diff)
Enable nullable for Jellyfin.Data and remove unnecessary attributes
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);