Skip to content

Commit

Permalink
altered to use the enum as requested in the pr
Browse files Browse the repository at this point in the history
  • Loading branch information
sscaife committed Sep 7, 2021
1 parent f2f4646 commit e23d292
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using SFA.DAS.EmployerFinance.Services;
using SFA.DAS.EmployerFinance.Web.ViewModels;
using SFA.DAS.HashingService;
using SFA.DAS.Common.Domain.Types;

namespace SFA.DAS.EmployerFinance.Web.Orchestrators
{
Expand Down Expand Up @@ -41,7 +42,9 @@ public async Task<OrchestratorResponse<TransfersIndexViewModel>> Index(string ha
var accountDetail = await _accountApiClient.GetAccount(hashedAccountId).ConfigureAwait(false);
var cohortsCount = await _cohortsService.GetCohortsCount(accountDetail.AccountId).ConfigureAwait(false);

if (string.Compare(accountDetail.ApprenticeshipEmployerType, "Levy", StringComparison.OrdinalIgnoreCase) != 0 || cohortsCount > 0)
Enum.TryParse(accountDetail.ApprenticeshipEmployerType, true, out ApprenticeshipEmployerType employerType);

if (employerType != ApprenticeshipEmployerType.Levy || cohortsCount > 0)
{
return new OrchestratorResponse<TransfersIndexViewModel>()
{
Expand Down

0 comments on commit e23d292

Please sign in to comment.