Skip to content

Commit

Permalink
#140: Make suggested changes as per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Aug 26, 2020
1 parent 182d054 commit 8c1dcd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/database/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from sqlalchemy import asc, desc


class DatabaseWhereFilter(WhereFilter):
def __init__(self, field, value, operation):
super().__init__(field, value, operation)
Expand Down
4 changes: 2 additions & 2 deletions common/icat/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def get_entity_with_filters(client, table_name, filters):

filter_handler = FilterOrderHandler()
filter_handler.add_filters(filters)
manage_order_filters(filter_handler.filters)
clear_order_filters(filter_handler.filters)
filter_handler.apply_filters(query)

data = execute_icat_query(client, query, True)
Expand All @@ -389,7 +389,7 @@ def get_entity_with_filters(client, table_name, filters):
return data


def manage_order_filters(filters):
def clear_order_filters(filters):
"""
Checks if any order filters have been added to the request and resets the variable
used to manage which attribute(s) to use for sorting results.
Expand Down

0 comments on commit 8c1dcd7

Please sign in to comment.