Skip to content

Commit

Permalink
fix: Update code
Browse files Browse the repository at this point in the history
  • Loading branch information
larshelge committed Nov 26, 2024
1 parent 793a55b commit 0640b81
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import static org.hisp.dhis.db.model.DataType.TEXT;
import static org.hisp.dhis.util.DateUtils.toLongDate;
import static org.hisp.dhis.util.DateUtils.toMediumDate;

import java.time.Year;
import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -51,7 +50,6 @@
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.hisp.dhis.analytics.AnalyticsTableHookService;
import org.hisp.dhis.analytics.AnalyticsTableType;
import org.hisp.dhis.analytics.AnalyticsTableUpdateParams;
Expand Down Expand Up @@ -90,6 +88,7 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import lombok.extern.slf4j.Slf4j;

/**
* @author Lars Helge Overland
Expand Down Expand Up @@ -388,10 +387,11 @@ private String getAttributeJoinClause(Program program) {
on en.trackedentityid=${uid}.trackedentityid \
and ${uid}.trackedentityattributeid = ${uid}""";

return getAttributeColumns(program).stream()
.map(col -> replaceQualify(template, Map.of("uid", quote(col.getName()))))
.collect(Collectors.joining(" "))
+ " ";
String sql = getAttributeColumns(program).stream()
.map(col -> replaceQualify(template, Map.of("uid", quote(col.getName()))))
.collect(Collectors.joining(" "));

return sql + " ";
}

/**
Expand Down

0 comments on commit 0640b81

Please sign in to comment.