Skip to content

Commit

Permalink
Fixes target comparison #2982
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Sep 11, 2023
1 parent 254d9d2 commit 719377d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1013,12 +1013,15 @@ class ProjectController {
}

private boolean hasTarget(value) {
value != 0 && value != "0"
if (value instanceof String) {
return value != "0"
}
value != 0
}

private boolean hasFinancialYearTarget(Map targetRow) {
def financialYearTarget = targetRow.financialYearTarget
financialYearTarget != 0 && financialYearTarget != "0"
hasTarget(financialYearTarget)
}

@PreAuthorise(accessLevel ='siteAdmin')
Expand Down

0 comments on commit 719377d

Please sign in to comment.