🐛 Ah bug fixes
This commit is contained in:
parent
9b7a3be5c9
commit
2be92d503e
@ -36,7 +36,7 @@ public class FileReferenceMigrationService(AppDatabase db)
|
|||||||
.Include(p => p.OutdatedAttachments)
|
.Include(p => p.OutdatedAttachments)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
var attachmentsId = posts.SelectMany(p => p.OutdatedAttachments.Select(a => a.Id)).ToList();
|
var attachmentsId = posts.SelectMany(p => p.Attachments.Select(a => a.Id)).ToList();
|
||||||
var attachments =
|
var attachments =
|
||||||
await db.Files.Where(f => attachmentsId.Contains(f.Id)).ToDictionaryAsync(x => x.Id);
|
await db.Files.Where(f => attachmentsId.Contains(f.Id)).ToDictionaryAsync(x => x.Id);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user