Adds more reading tests

This commit is contained in:
Mouse Reeve
2021-01-13 18:02:01 -08:00
parent 3eceb1e2b8
commit 7d6a06025e
2 changed files with 81 additions and 2 deletions

View File

@ -27,7 +27,7 @@ def start_reading(request, book_id):
# create a readthrough
readthrough = update_readthrough(request, book=book)
if readthrough.start_date:
if readthrough:
readthrough.save()
# shelve the book
@ -65,7 +65,7 @@ def finish_reading(request, book_id):
# update or create a readthrough
readthrough = update_readthrough(request, book=book)
if readthrough.start_date or readthrough.finish_date:
if readthrough:
readthrough.save()
# shelve the book