Skip to content

Commit

Permalink
flake
Browse files Browse the repository at this point in the history
  • Loading branch information
k1o0 committed Mar 1, 2024
1 parent d55f2b3 commit 03c959c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions alyx/actions/tests_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,10 @@ def test_sessions(self):
# test dataset type filters
dtype1, _ = DatasetType.objects.get_or_create(name='trials.table')
dtype2, _ = DatasetType.objects.get_or_create(name='wheel.position')
Dataset.objects.create(session=ses, name='_ibl_trials.table.pqt', dataset_type=dtype1, qc=40)
Dataset.objects.create(session=ses, name='_ibl_wheel.position.npy', dataset_type=dtype2, qc=30)
Dataset.objects.create(
session=ses, name='_ibl_trials.table.pqt', dataset_type=dtype1, qc=40)
Dataset.objects.create(
session=ses, name='_ibl_wheel.position.npy', dataset_type=dtype2, qc=30)
d = self.ar(self.client.get(reverse('session-list') + '?dataset_types=wheel.position'))
self.assertCountEqual([str(ses.pk)], (x['id'] for x in d))
q = '?dataset_types=wheel.position,trials.table' # Check with list
Expand Down
7 changes: 4 additions & 3 deletions alyx/actions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,11 @@ class ProcedureTypeList(generics.ListCreateAPIView):


class SessionFilter(BaseActionFilter):
dataset_types = django_filters.CharFilter(field_name='dataset_types',
method='filter_dataset_types')
dataset_types = django_filters.CharFilter(
field_name='dataset_types', method='filter_dataset_types')
datasets = django_filters.CharFilter(field_name='datasets', method='filter_datasets')
dataset_qc_lte = django_filters.CharFilter(field_name='dataset_qc', method='filter_dataset_qc_lte')
dataset_qc_lte = django_filters.CharFilter(
field_name='dataset_qc', method='filter_dataset_qc_lte')
performance_gte = django_filters.NumberFilter(field_name='performance',
method='filter_performance_gte')
performance_lte = django_filters.NumberFilter(field_name='performance',
Expand Down

0 comments on commit 03c959c

Please sign in to comment.