Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feature/issue3421
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Feb 18, 2025
2 parents a466f2a + 3a7e522 commit 574a8f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ class OrganisationController {
List scores = services.collect{it.scores}.flatten()
dashboardData = organisationService.scoresForOrganisation(organisation, scores?.collect{it.scoreId}, !hasEditorAccess)
}
boolean showTargets = userService.userIsSiteAdmin() && services && targetPeriods
boolean hasTargets = services && targetPeriods
boolean showTargets = hasTargets && userService.userIsSiteAdmin()
// This call is used to ensure the organisation funding total is kept up to date as the algorithm
// for selecting the current total is based on the current date. The funding total is used when
// calculating data for the dashboard.
if (showTargets) {
if (hasTargets) {
organisationService.checkAndUpdateFundingTotal(organisation)
}
boolean targetsEditable = userService.userIsAlaOrFcAdmin()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class OrganisationService {
rcsFunding.rowTotal = funding
organisation.custom.details.funding.overallTotal = rcsFunding.rowTotal
log.info("Updating the funding information for organisation ${organisation.organisationId} to $funding")
update(organisation.organisationId, organisation.custom)
update(organisation.organisationId, [custom:organisation.custom])
}

}
Expand Down

0 comments on commit 574a8f0

Please sign in to comment.