Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorighi committed Sep 23, 2024
1 parent d8b4504 commit db16d8e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/helpers/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_pagination(args):
return int(args.get('limit', 10)), int(args.get('offset', 0))

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

def get_items(args, db_model, q_query, default_tsv_fields):

Expand Down
5 changes: 2 additions & 3 deletions server/rest/sample_location/sample_locations_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ def get_sample_locations(offset=0, limit=10000, lineage=None, sample_type=None,
if lineage:
query &= Q(lineage=str(lineage))

if sample_type:
if sample_type in ['local_sample', 'biosample']:
query &= Q(is_local_sample=(sample_type == 'local_sample'))
if sample_type and sample_type in ['local_sample', 'biosample']:
query &= Q(is_local_sample=(sample_type == 'local_sample'))

# Apply filtering if needed
if filter:
Expand Down

0 comments on commit db16d8e

Please sign in to comment.