mirror of
https://github.com/etesync/server
synced 2024-11-15 21:38:57 +00:00
Views: fix wrong items name.
This commit is contained in:
parent
ae4aafcf96
commit
e851fb9877
@ -268,14 +268,14 @@ class CollectionItemViewSet(BaseViewSet):
|
||||
if ser_valid and deps_ser_valid:
|
||||
try:
|
||||
with transaction.atomic():
|
||||
collections = serializer.save(collection=collection_object)
|
||||
items = serializer.save(collection=collection_object)
|
||||
except IntegrityError:
|
||||
# FIXME: should return the items with a bad token (including deps) so we don't have to fetch them after
|
||||
content = {'code': 'integrity_error'}
|
||||
return Response(content, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
ret = {
|
||||
"data": [collection.stoken for collection in collections],
|
||||
"data": [item.stoken for item in items],
|
||||
}
|
||||
return Response(ret, status=status.HTTP_200_OK)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user