Skip to content

Commit

Permalink
#141: Add distinct aspect of ICAT distinct filter
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Aug 24, 2020
1 parent 20c7120 commit d41359f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/icat/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def apply_filter(self, query):
try:
log.info("Adding ICAT distinct filter to ICAT query")
log.debug(f"Self fields: {self.fields}")

query.setAttribute(self.fields[0])
query.setAggregate("DISTINCT")

except ValueError as e:
raise FilterError(e)
Expand Down

0 comments on commit d41359f

Please sign in to comment.