Handle incoming review

This commit is contained in:
Mouse Reeve
2020-01-27 21:25:26 -08:00
parent b2b651a22f
commit c4ce4ae47e
2 changed files with 43 additions and 4 deletions

View File

@ -9,6 +9,8 @@ def get_or_create_book(olkey, user=None, update=True):
# check if this is a valid open library key, and a book
olkey = olkey
response = requests.get(OL_URL + olkey + '.json')
if not response.ok:
response.raise_for_status()
# get the existing entry from our db, if it exists
try: