The Free Software Media System - Server Backend & API
Merge pull request #14653 from evan314159/coremigration
evan3141597aa1c4644771
diff --git a/Jellyfin.Server/Migrations/Stages/CodeMigration.cs b/Jellyfin.Server/Migrations/Stages/CodeMigration.csindex 264710bce0..971b47608f 100644--- a/Jellyfin.Server/Migrations/Stages/CodeMigration.cs+++ b/Jellyfin.Server/Migrations/Stages/CodeMigration.cs@@ -34,12 +34,8 @@ internal class CodeMigration(Type migrationType, JellyfinMigrationAttribute meta{if (service.Lifetime == ServiceLifetime.Singleton && !service.ServiceType.IsGenericTypeDefinition){- object? serviceInstance = serviceProvider.GetService(service.ServiceType);- if (serviceInstance != null)- {- childServiceCollection.AddSingleton(service.ServiceType, serviceInstance);- continue;- }+ childServiceCollection.AddSingleton(service.ServiceType, _ => serviceProvider.GetService(service.ServiceType)!);+ continue;}childServiceCollection.Add(service);