[backend/core] Fix user purge failures (ISH-525)

This commit is contained in:
Laura Hausmann 2024-10-11 19:54:04 +02:00
parent c72aa17056
commit bef7dd9855
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -326,7 +326,10 @@ public class BackgroundTaskQueue(int parallelism)
logger.LogDebug("Removing {count} notes for user {id}", noteCnt, user.Id);
await foreach (var id in noteIds)
{
var note = await db.Notes.AsNoTracking().FirstOrDefaultAsync(p => p.Id == id, cancellationToken: token);
var note = await db.Notes.AsNoTracking()
.IncludeCommonProperties()
.FirstOrDefaultAsync(p => p.Id == id, cancellationToken: token);
if (note != null) await noteSvc.DeleteNoteAsync(note);
}