🐛 Ah bug fixes

This commit is contained in:
LittleSheep 2025-06-02 21:30:27 +08:00
parent 740f5ad3fc
commit 9b7a3be5c9

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();