Lift book lookup from create_review to review action.
This commit is contained in:
parent
d43c513d19
commit
4e67d8bb38
2 changed files with 6 additions and 5 deletions
|
@ -23,11 +23,8 @@ def create_review_from_activity(author, activity):
|
|||
return review
|
||||
|
||||
|
||||
def create_review(user, possible_book, name, content, rating):
|
||||
def create_review(user, book, name, content, rating):
|
||||
''' a book review has been added '''
|
||||
# throws a value error if the book is not found
|
||||
book = get_or_create_book(possible_book)
|
||||
|
||||
content = sanitize(content)
|
||||
|
||||
# no ratings outside of 0-5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue