fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nonexistent field
[wolnelektury.git]
/
src
/
catalogue
/
api
/
views.py
diff --git
a/src/catalogue/api/views.py
b/src/catalogue/api/views.py
index
3449339
..
a04cc6d
100644
(file)
--- a/
src/catalogue/api/views.py
+++ b/
src/catalogue/api/views.py
@@
-180,8
+180,7
@@
class BookList(LegacyListAPIView):
bm.index = index
bm.project_description = project_description
bm.project_icon = project_icon
bm.index = index
bm.project_description = project_description
bm.project_icon = project_icon
- bm.file.save(None, request.data['file'], save=False)
- bm.save(parts_count=parts_count)
+ bm.set_file(request.data['file'], parts_count=parts_count)
return Response({}, status=status.HTTP_201_CREATED)
return Response({}, status=status.HTTP_201_CREATED)
@@
-584,5
+583,5
@@
from rest_framework.views import APIView
class BookJsonView(APIView):
def get(self, request, slug):
book = get_object_or_404(Book, slug=slug)
class BookJsonView(APIView):
def get(self, request, slug):
book = get_object_or_404(Book, slug=slug)
- js = conv(etree.parse(book.xml_file.path))
+ js = conv(etree.parse(book.xml_file.path)
, slug
)
return JsonResponse(js, json_dumps_params={'ensure_ascii': False})
return JsonResponse(js, json_dumps_params={'ensure_ascii': False})