Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not include site calculation if project is state wide or nation wide #1074

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions grails-app/services/au/org/ala/ecodata/ProjectService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1313,19 +1313,21 @@ class ProjectService {
}

Map geographicInfo = project?.geographicInfo
Map intersections = orderLayerIntersectionsByAreaOfProjectSites(project)
Map config = metadataService.getGeographicConfig()
List intersectionLayers = config?.checkForBoundaryIntersectionInLayers
intersectionLayers?.each { layer ->
Map facetName = metadataService.getGeographicFacetConfig(layer)
if (facetName.name) {
List intersectionValues = intersections[layer]
if (intersectionValues) {
result["project${facetName.name.capitalize()}Facet"] = intersectionValues
if (!geographicInfo?.statewide && !geographicInfo?.nationwide) {
Map intersections = orderLayerIntersectionsByAreaOfProjectSites(project)
Map config = metadataService.getGeographicConfig()
List intersectionLayers = config?.checkForBoundaryIntersectionInLayers
intersectionLayers?.each { layer ->
Map facetName = metadataService.getGeographicFacetConfig(layer)
if (facetName.name) {
List intersectionValues = intersections[layer]
if (intersectionValues) {
result["project${facetName.name.capitalize()}Facet"] = intersectionValues
}
}
else
log.error ("No facet config found for layer $layer.")
}
else
log.error ("No facet config found for layer $layer.")
}

// take a copy of calculated states & electorates for comparison
Expand Down