From cfc7fb97bd6ef14c1b5f408d82223227f4f685be Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Wed, 25 Mar 2015 12:17:11 +0530 Subject: fixed a minor bug --- tbc/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tbc/views.py b/tbc/views.py index 5b2802c..d626944 100755 --- a/tbc/views.py +++ b/tbc/views.py @@ -879,10 +879,8 @@ def SubmitCode(request): chapter = list(Chapters.objects.filter(name=dict[chapter_image]))[-1] chapter.screen_shots.add(screenshot) chapter.save() - book = Book.objects.order_by("-id")[0] - proposal = Proposal.objects.get(accepted=book) - proposal.status = "codes submitted" - proposal.save() + curr_proposal.status = "codes submitted" + curr_proposal.save() subject = "Python-TBC: Book Submission" message = """Hi """+curr_book.reviewer.name+""",\nA book has been submitted on the Python TBC interface.\n Detailf othe book & contributor:\n Contributor: """+curr_book.contributor.user.first_name+""" """+curr_book.contributor.user.last_name+"""\nBook Title"""+curr_book.title+"""\nAuthor: """+curr_book.title+"""\nAuthor: """+curr_book.author+"""\n Publisher: """+curr_book.publisher_place+"""\nISBN: """+curr_book.isbn+"""\nFollow the link to riview the book:\nhttp://tbc-python.fosse.in/book-review/"""+str(curr_book.id) log_chat = subject + '\n' + 'Book ' + curr_book.title + \ -- cgit