🐛 Bug fixes

This commit is contained in:
LittleSheep 2025-06-02 20:33:43 +08:00
parent 0550c4f6de
commit 2691c5d9ac

View File

@ -34,7 +34,6 @@ public class FileReferenceMigrationService(AppDatabase db)
{ {
var posts = await db.Posts var posts = await db.Posts
.Include(p => p.OutdatedAttachments) .Include(p => p.OutdatedAttachments)
.Where(p => p.OutdatedAttachments.Any())
.ToListAsync(); .ToListAsync();
var attachmentsId = posts.SelectMany(p => p.OutdatedAttachments.Select(a => a.Id)).ToList(); var attachmentsId = posts.SelectMany(p => p.OutdatedAttachments.Select(a => a.Id)).ToList();