More Bugfixes (#2685)
This commit is contained in:
parent
4a9519b6dc
commit
061b363f96
31 changed files with 162 additions and 119 deletions
|
|
@ -14,9 +14,9 @@ public static class MigrateUserLibrarySideNavStream
|
|||
{
|
||||
public static async Task Migrate(IUnitOfWork unitOfWork, DataContext dataContext, ILogger<Program> logger)
|
||||
{
|
||||
logger.LogCritical("Running MigrateUserLibrarySideNavStream migration - Please be patient, this may take some time. This is not an error");
|
||||
|
||||
var usersWithLibraryStreams = await dataContext.AppUser.Include(u => u.SideNavStreams)
|
||||
var usersWithLibraryStreams = await dataContext.AppUser
|
||||
.Include(u => u.SideNavStreams)
|
||||
.AnyAsync(u => u.SideNavStreams.Count > 0 && u.SideNavStreams.Any(s => s.LibraryId > 0));
|
||||
|
||||
if (usersWithLibraryStreams)
|
||||
|
|
@ -25,6 +25,8 @@ public static class MigrateUserLibrarySideNavStream
|
|||
return;
|
||||
}
|
||||
|
||||
logger.LogCritical("Running MigrateUserLibrarySideNavStream migration - Please be patient, this may take some time. This is not an error");
|
||||
|
||||
var users = await unitOfWork.UserRepository.GetAllUsersAsync(AppUserIncludes.SideNavStreams);
|
||||
foreach (var user in users)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue