Skip to content

Commit

Permalink
Do not remove pinned clips when removing old clips.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tum4ik committed Nov 12, 2024
1 parent 6c99d39 commit 20005f0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public async Task DeleteBeforeDateAsync(DateTime date)
{
using var dbContext = await _dbContextFactory.CreateDbContextAsync().ConfigureAwait(false);
var clipIdsToRemove = dbContext.Clips
.Where(c => c.ClippedAt < date)
.Where(c => c.ClippedAt < date)
.Where(c => !dbContext.PinnedClips.Select(pc => pc.Clip.Id).Contains(c.Id))
.Select(c => c.Id);
var clipIdsCommaSeparated = string.Join(",", clipIdsToRemove);
await dbContext.Database
Expand Down

0 comments on commit 20005f0

Please sign in to comment.