Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion alyx/alyx/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = __version__ = '3.4.1'
VERSION = __version__ = '3.4.2'
3 changes: 3 additions & 0 deletions alyx/data/tests_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
10 changes: 7 additions & 3 deletions alyx/data/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions requirements_frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading