Parse rating int in view handler.

Activity already represents rating as an int in the json.
This commit is contained in:
Adam Kelly
2020-04-02 10:25:47 +01:00
parent cceb433620
commit 5bcf65a8a1
2 changed files with 3 additions and 4 deletions

View File

@ -172,7 +172,7 @@ def review(request):
# TODO: validation, htmlification
name = form.data.get('name')
content = form.data.get('content')
rating = form.data.get('rating')
rating = form.cleaned_data.get('rating')
# throws a value error if the book is not found
book = get_or_create_book(book_identifier)