Skip to content

Commit

Permalink
SAK-46143 - Worksite Setup: Order by creation date does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Pellicer committed Aug 31, 2021
1 parent ee0627b commit 465753e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;
import java.util.stream.Collectors;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -1117,9 +1117,9 @@ public List<String> getSiteIds(SelectionType type, Object ofType, String criteri
log.debug("getSiteIds SQL: {}, values: {}", sql, java.util.Arrays.toString(values));

List<String> results = sqlService().dbRead(sql, values, siteIdReader);
Set<String> siteIds = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
Set<String> siteIds = new LinkedHashSet<>();
if (results != null) siteIds.addAll(results);
Set<String> excludedSiteIds = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
Set<String> excludedSiteIds = new LinkedHashSet<>();
if (excludedSites != null) excludedSiteIds.addAll(excludedSites);
siteIds.removeAll(excludedSiteIds);
return new ArrayList<>(siteIds);
Expand Down

0 comments on commit 465753e

Please sign in to comment.