diff options
Diffstat (limited to 'tbc/views.py')
-rwxr-xr-x | tbc/views.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tbc/views.py b/tbc/views.py index bc3913b..f45df40 100755 --- a/tbc/views.py +++ b/tbc/views.py @@ -348,6 +348,8 @@ def ContentUpload(request, book_id=None): screenshot = ScreenShots() screenshot.caption = request.POST['caption'+str(i)] screenshot.image = request.FILES['image'+str(i)] + chapter = Chapters.objects.get(name=request.POST['caption'+str(i)], book=curr_book) + screenshot.chapter = chapter screenshot.book = curr_book screenshot.save() book = Book.objects.order_by("-id")[0] |