Skip to content

Commit

Permalink
Add repr for WHERE filter to make logging them more readable
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Oct 2, 2024
1 parent 60c5254 commit 350480b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datagateway_api/src/common/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ def __init__(self, field, value, operation):
"must contain two values e.g. [1, 2]",
)

def __repr__(self):
return f"Field: {self.field}, Operation: {self.operation}, Value: {self.value}"


class DistinctFieldFilter(QueryFilter):
precedence = 0
Expand Down

0 comments on commit 350480b

Please sign in to comment.