Skip to content

Commit

Permalink
Merge pull request #914 from DFE-Digital/hotfix/phase-null-check
Browse files Browse the repository at this point in the history
Null check for phase
  • Loading branch information
dneed-nimble authored Sep 26, 2023
2 parents 9b47d3b + f7764c6 commit 26053f8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ private void RePopDatePickerModelsAfterValidationFail()
}
public static decimal? CalculateGrantAmount(string type, string phase)
{
if (phase is null) return 25000;
switch (phase.ToLower())
{
case "primary":
Expand All @@ -102,20 +103,20 @@ private void RePopDatePickerModelsAfterValidationFail()
SponsoredGrantType.FastTrack => 70000,
SponsoredGrantType.Full => 110000,
SponsoredGrantType.Intermediate => 90000,
_ => 0
_ => 25000
};
case "secondary":
return type switch
{
SponsoredGrantType.FastTrack => 80000,
SponsoredGrantType.Full => 150000,
SponsoredGrantType.Intermediate => 115000,
_ => 0
_ => 25000
};
}

// Else return default £25k
return 25000;
return 25000;
}

protected UpdateAcademyConversionProject Build()
Expand Down

0 comments on commit 26053f8

Please sign in to comment.