From cb3c3fe10e93614317ed19d6f1e5e89e701aafec Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Wed, 16 Nov 2016 09:55:05 +0000 Subject: [PATCH] Fixed potential crash #683 --- PlexRequests.Core.Migration/Migrations/Version1100.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PlexRequests.Core.Migration/Migrations/Version1100.cs b/PlexRequests.Core.Migration/Migrations/Version1100.cs index dbbfab158..616f0c3d9 100644 --- a/PlexRequests.Core.Migration/Migrations/Version1100.cs +++ b/PlexRequests.Core.Migration/Migrations/Version1100.cs @@ -96,6 +96,10 @@ namespace PlexRequests.Core.Migration.Migrations private void UpdatePlexUsers() { var settings = PlexSettings.GetSettings(); + if (string.IsNullOrEmpty(settings.PlexAuthToken)) + { + return; + } var plexUsers = PlexApi.GetUsers(settings.PlexAuthToken); var prSettings = PlexRequestSettings.GetSettings(); @@ -138,6 +142,7 @@ namespace PlexRequests.Core.Migration.Migrations PlexUserId = user.Id, Permissions = permissions, Features = 0, + UserAlias = string.Empty, }; PlexUsers.Insert(m);