You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a session using the REST API without specifying the users, this error occurs:
[Errno 500] /sessions: 'Traceback (most recent call last):
File "/var/www/alyx-test/venv/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/var/www/alyx-test/venv/lib/python3.8/site-packages/rest_framework/generics.py", line 246, in post
return self.create(request, *args, **kwargs)
File "/var/www/alyx-test/venv/lib/python3.8/site-packages/rest_framework/mixins.py", line 19, in create
self.perform_create(serializer)
File "/var/www/alyx-test/venv/lib/python3.8/site-packages/rest_framework/mixins.py", line 24, in perform_create
serializer.save()
File "/var/www/alyx-test/venv/lib/python3.8/site-packages/rest_framework/serializers.py", line 208, in save
self.instance = self.create(validated_data)
File "/var/www/alyx-test/venv/lib/python3.8/site-packages/rest_framework/serializers.py", line 1014, in create
field.set(value)
File "/var/www/alyx-test/venv/lib/python3.8/site-packages/django/db/models/fields/related_descriptors.py", line 1209, in set
objs = tuple(objs)
TypeError: 'LabMember' object is not iterable
'
I wonder if the problem is not on this line where the default users should actually be a list with a single element [serializers.CurrentUserDefault()] instead of just serializers.CurrentUserDefault().
The text was updated successfully, but these errors were encountered:
When creating a session using the REST API without specifying the
users
, this error occurs:I wonder if the problem is not on this line where the default
users
should actually be a list with a single element[serializers.CurrentUserDefault()]
instead of justserializers.CurrentUserDefault()
.The text was updated successfully, but these errors were encountered: