Skip to content

Commit

Permalink
add empty args request handling
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorighi committed Oct 4, 2024
1 parent 2f0f4e3 commit 9d252fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/helpers/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ def get_pagination(args):
return int(args.pop('limit', 10)), int(args.pop('offset', 0))

def get_sort(args):
return args.pop('sort_column'), args.pop('sort_order')
return args.pop('sort_column', None), args.pop('sort_order', None)

def get_items(model, immutable_dict):

mapper = MODEL_MAPPER.get(model)

args = MultiDict(immutable_dict)

filter = args.pop('filter')
filter = args.pop('filter', None)

q_query = mapper.get('query')(filter) if filter else None

Expand Down

0 comments on commit 9d252fa

Please sign in to comment.