From beb38456bb6ac0fc56d68e95450dc2e4021927d5 Mon Sep 17 00:00:00 2001 From: aundus Date: Fri, 7 May 2021 12:52:22 -0400 Subject: [PATCH] fix field mapping --- bookshelf_management/apps/mgmt/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookshelf_management/apps/mgmt/views.py b/bookshelf_management/apps/mgmt/views.py index e7a88ba..a68fc3a 100644 --- a/bookshelf_management/apps/mgmt/views.py +++ b/bookshelf_management/apps/mgmt/views.py @@ -27,7 +27,7 @@ def insertBookToBookshelf(bookId, bookshelfId): def booksInBookshelf(request, bookshelfId): bookshelfName = Bookshelf.objects.get(id=bookshelfId).bookshelf idList = BookshelfToBook.objects.filter(fk_bookshelves=bookshelfId).values_list('fk_books', flat=True) - books = Book.objects.filter(id__in=idList).order_by('bookshelf') + books = Book.objects.filter(id__in=idList).order_by('title') context = { 'books': books,