From e17e558ad2c0a607bb2a6cf8a06d711428ecaf0b Mon Sep 17 00:00:00 2001 From: Maxwell Weru Date: Fri, 24 Nov 2023 12:28:43 +0300 Subject: [PATCH] Do not fetch the repository from the database if it has been deleted (#886) --- server/Tingle.Dependabot/Consumers/RepositoryEventsConsumer.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/server/Tingle.Dependabot/Consumers/RepositoryEventsConsumer.cs b/server/Tingle.Dependabot/Consumers/RepositoryEventsConsumer.cs index d5caf706..9aa0f5dd 100644 --- a/server/Tingle.Dependabot/Consumers/RepositoryEventsConsumer.cs +++ b/server/Tingle.Dependabot/Consumers/RepositoryEventsConsumer.cs @@ -43,7 +43,6 @@ public async Task ConsumeAsync(EventContext context, Can // remove from scheduler var repositoryId = evt.RepositoryId ?? throw new InvalidOperationException($"'{nameof(evt.RepositoryId)}' cannot be null"); - var repository = await dbContext.Repositories.SingleAsync(r => r.Id == repositoryId, cancellationToken); await scheduler.RemoveAsync(repositoryId, cancellationToken); } }