From 5e126d3d3dbae452812539c9c14d65744e063ea5 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 23 Jan 2021 22:19:54 +0000 Subject: [PATCH 1/2] Fixed deploy script --- .azuredevops/pipelines/templates/variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/templates/variables.yml b/.azuredevops/pipelines/templates/variables.yml index c52df627d..205e68eaa 100644 --- a/.azuredevops/pipelines/templates/variables.yml +++ b/.azuredevops/pipelines/templates/variables.yml @@ -27,4 +27,4 @@ variables: value: "4.0.$(Build.BuildId)" - name: isMain - value: $[or(contains(variables['Build.SourceBranch'], 'develop'), contains(variables['Build.SourceBranch'], 'main'))] \ No newline at end of file + value: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/develop'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))] \ No newline at end of file From 951cc7da1b377503c2f490d3bfafaf9b4c181c40 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 23 Jan 2021 23:25:51 +0000 Subject: [PATCH 2/2] Improved a query (minor) --- .../Repository/Requests/TvRequestRepository.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Ombi.Store/Repository/Requests/TvRequestRepository.cs b/src/Ombi.Store/Repository/Requests/TvRequestRepository.cs index 985f464fd..a5a7406ab 100644 --- a/src/Ombi.Store/Repository/Requests/TvRequestRepository.cs +++ b/src/Ombi.Store/Repository/Requests/TvRequestRepository.cs @@ -22,21 +22,21 @@ namespace Ombi.Store.Repository.Requests { return await Db.TvRequests.Where(x => x.TvDbId == tvDbId) .Include(x => x.ChildRequests) - .ThenInclude(x => x.RequestedUser) + .ThenInclude(x => x.RequestedUser) .Include(x => x.ChildRequests) - .ThenInclude(x => x.SeasonRequests) - .ThenInclude(x => x.Episodes) + .ThenInclude(x => x.SeasonRequests) + .ThenInclude(x => x.Episodes) .FirstOrDefaultAsync(); } public TvRequests GetRequest(int tvDbId) { - return Db.TvRequests.Where(x => x.TvDbId == tvDbId) + return Db.TvRequests.Where(x => x.TvDbId == tvDbId).AsSplitQuery() .Include(x => x.ChildRequests) - .ThenInclude(x => x.RequestedUser) + .ThenInclude(x => x.RequestedUser) .Include(x => x.ChildRequests) - .ThenInclude(x => x.SeasonRequests) - .ThenInclude(x => x.Episodes) + .ThenInclude(x => x.SeasonRequests) + .ThenInclude(x => x.Episodes) .FirstOrDefault(); }