Skip to content

Commit

Permalink
modify set sort only if measure is available
Browse files Browse the repository at this point in the history
  • Loading branch information
alebjanes committed Jul 23, 2024
1 parent d416fad commit 7192e32
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/api_data_request/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ def build_api(self) -> str:
"""
query_params = []

self.set_sort('Trade Value', 'desc')
if 'Trade Value' in self.measures:
self.set_sort('Trade Value', 'desc')
elif 'Quantity' in self.measures:
self.set_sort('Quantity', 'desc')

if self.cube:
query_params.append(f"cube={self.cube}")
Expand Down

0 comments on commit 7192e32

Please sign in to comment.