From 03c959cb8379239836174d81075ac17b7c68e248 Mon Sep 17 00:00:00 2001 From: Miles Wells Date: Fri, 1 Mar 2024 16:13:34 +0000 Subject: [PATCH] flake --- alyx/actions/tests_rest.py | 6 ++++-- alyx/actions/views.py | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/alyx/actions/tests_rest.py b/alyx/actions/tests_rest.py index 8bf83c2a..27531128 100644 --- a/alyx/actions/tests_rest.py +++ b/alyx/actions/tests_rest.py @@ -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 diff --git a/alyx/actions/views.py b/alyx/actions/views.py index 664c30c0..d9df6054 100644 --- a/alyx/actions/views.py +++ b/alyx/actions/views.py @@ -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',