From 8bbe9ce996f1b567783813afd268cf3bb8b35d4f Mon Sep 17 00:00:00 2001 From: Miles Wells Date: Wed, 25 Feb 2026 15:57:37 +0200 Subject: [PATCH 1/5] Support labs as list (resolves #980) --- alyx/alyx/__init__.py | 2 +- alyx/data/tests_rest.py | 3 +++ alyx/data/views.py | 10 +++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/alyx/alyx/__init__.py b/alyx/alyx/__init__.py index 9d307c8f9..823f79397 100644 --- a/alyx/alyx/__init__.py +++ b/alyx/alyx/__init__.py @@ -1 +1 @@ -VERSION = __version__ = '3.4.1' +VERSION = __version__ = '3.4.2' diff --git a/alyx/data/tests_rest.py b/alyx/data/tests_rest.py index f15758678..71fb614e8 100644 --- a/alyx/data/tests_rest.py +++ b/alyx/data/tests_rest.py @@ -259,6 +259,9 @@ def test_register_files(self): 'hostname': 'hostname', 'labs': ['laba'], } + # NB: After serialization and deserialization, labs ends up as a str in this test, + # however ONE REST requests appear to serialize differently, with labs remaining as + # a list. Both lists and comma separated strings must be supported r = self.client.post(reverse('register-file'), data) self.ar(r, 201) fr = FileRecord.objects.filter(dataset=Dataset.objects.get(name='a.a.e1')) diff --git a/alyx/data/views.py b/alyx/data/views.py index b65ce05fb..aa0551707 100644 --- a/alyx/data/views.py +++ b/alyx/data/views.py @@ -523,9 +523,13 @@ def create(self, request): check_protected = check_protected == 'True' # Multiple labs (NB: projects is an alias of labs) - labs = request.data.get('labs', '').split(',') - labs += request.data.get('projects', '').split(',') - labs = [Lab.objects.get(name=lab) for lab in labs if lab] + labs = request.data.get('labs', []) + if isinstance(labs, str): + labs = labs.split(',') + projects = request.data.get('projects', []) + if isinstance(projects, str): + projects = projects.split(',') + labs = [Lab.objects.get(name=lab) for lab in labs + projects if lab] repositories = _get_repositories_for_labs(labs or [subject.lab], server_only=server_only) if repo and repo not in repositories: repositories += [repo] From 625477100460b29dcefa0113596d40a7d49562aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Feb 2026 18:41:34 +0000 Subject: [PATCH 2/5] Bump sqlparse from 0.5.3 to 0.5.4 Bumps [sqlparse](https://github.com/andialbrecht/sqlparse) from 0.5.3 to 0.5.4. - [Changelog](https://github.com/andialbrecht/sqlparse/blob/master/CHANGELOG) - [Commits](https://github.com/andialbrecht/sqlparse/compare/0.5.3...0.5.4) --- updated-dependencies: - dependency-name: sqlparse dependency-version: 0.5.4 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements_frozen.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_frozen.txt b/requirements_frozen.txt index 5cf201247..46b04eba1 100644 --- a/requirements_frozen.txt +++ b/requirements_frozen.txt @@ -70,7 +70,7 @@ ruff==0.11.11 s3transfer==0.13.0 setuptools==80.9.0 six==1.17.0 -sqlparse==0.5.3 +sqlparse==0.5.4 structlog==25.3.0 tqdm==4.67.1 tzdata==2025.2 From 91ef8f956c162028e762c9c7698d86ad4cd90133 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 17:17:51 +0000 Subject: [PATCH 3/5] Bump pillow from 11.2.1 to 12.1.1 Bumps [pillow](https://github.com/python-pillow/Pillow) from 11.2.1 to 12.1.1. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](https://github.com/python-pillow/Pillow/compare/11.2.1...12.1.1) --- updated-dependencies: - dependency-name: pillow dependency-version: 12.1.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements_frozen.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_frozen.txt b/requirements_frozen.txt index 46b04eba1..f59ca20ac 100644 --- a/requirements_frozen.txt +++ b/requirements_frozen.txt @@ -52,7 +52,7 @@ numpy==2.2.6 ONE-api==3.1.1 packaging==25.0 pandas==2.2.3 -pillow==11.2.1 +pillow==12.1.1 psycopg2-binary==2.9.10 pyarrow==20.0.0 pycodestyle==2.13.0 From 95ebd32199ffc3cb5043c71ae7bf10d0ff18631c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 02:14:50 +0000 Subject: [PATCH 4/5] Bump cryptography from 45.0.3 to 46.0.5 Bumps [cryptography](https://github.com/pyca/cryptography) from 45.0.3 to 46.0.5. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/cryptography/compare/45.0.3...46.0.5) --- updated-dependencies: - dependency-name: cryptography dependency-version: 46.0.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- requirements_frozen.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_frozen.txt b/requirements_frozen.txt index f59ca20ac..bc19880a2 100644 --- a/requirements_frozen.txt +++ b/requirements_frozen.txt @@ -11,7 +11,7 @@ coreapi==2.3.3 coreschema==0.0.4 coverage==7.8.2 coveralls==4.0.1 -cryptography==45.0.3 +cryptography==46.0.5 cycler==0.12.1 Django==5.2.11 django-admin-list-filter-dropdown==1.0.3 From 2e33ed48338052d32ee93f59091df5c195f33b21 Mon Sep 17 00:00:00 2001 From: Miles Wells Date: Wed, 25 Feb 2026 17:20:29 +0200 Subject: [PATCH 5/5] Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a7400e72..3dbab3410 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.4.2] + +### Fixed +- error in register-files endpoint when labs is a list + ## [3.4.1] ### Modified