mirror of
https://github.com/etesync/server
synced 2024-11-25 18:28:46 +00:00
Item create: 404 if collection isn't found.
It doesn't actually change anything beacuse it 404s in the collection getting, but still, good to have this here too.
This commit is contained in:
parent
cc00391504
commit
d6df94facf
@ -121,7 +121,7 @@ class CollectionItemViewSet(BaseViewSet):
|
||||
return queryset
|
||||
|
||||
def create(self, request, collection_uid=None):
|
||||
collection_object = self.get_collection_queryset(Collection.objects).get(uid=collection_uid)
|
||||
collection_object = get_object_or_404(self.get_collection_queryset(Collection.objects), uid=collection_uid)
|
||||
|
||||
many = isinstance(request.data, list)
|
||||
serializer = self.serializer_class(data=request.data, many=many)
|
||||
|
Loading…
Reference in New Issue
Block a user