Skip to content

Commit

Permalink
fix: repo browser service failed to get all repos if there is no sync…
Browse files Browse the repository at this point in the history
… tasks exist
  • Loading branch information
Misaka-L committed Aug 29, 2024
1 parent 9862895 commit 13de361
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion VPMReposSynchronizer.Core/Services/RepoBrowserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public async ValueTask<BrowserRepo[]> GetAllReposAsync()
var browserRepos = mapper.Map<BrowserRepo[]>(repoEntities);
foreach (var browserRepo in browserRepos)
{
browserRepo.SyncStatus = repoSyncStatuses[browserRepo.ApiId];
browserRepo.SyncStatus = repoSyncStatuses.TryGetValue(browserRepo.ApiId, out var syncStatus)
? syncStatus
: null;
browserRepo.RepoUrl = GetRepoUrl(browserRepo.UpstreamId);
}

Expand Down

0 comments on commit 13de361

Please sign in to comment.