summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhardythe12015-03-25 12:17:11 +0530
committerhardythe12015-03-25 12:17:11 +0530
commitcfc7fb97bd6ef14c1b5f408d82223227f4f685be (patch)
treeb91f785711225b29a845911f10130f99f6dc75b9
parent8fc4844775edd500fd11508043d284048e1add96 (diff)
downloadPython-TBC-Interface-cfc7fb97bd6ef14c1b5f408d82223227f4f685be.tar.gz
Python-TBC-Interface-cfc7fb97bd6ef14c1b5f408d82223227f4f685be.tar.bz2
Python-TBC-Interface-cfc7fb97bd6ef14c1b5f408d82223227f4f685be.zip
fixed a minor bug
-rwxr-xr-xtbc/views.py6
1 files 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 + \