Commit 665f7a28 authored by ynerant's avatar ynerant

Ensure that the fetched roman ISBN is the queried ISBN

parent c1098577
Pipeline #4236 passed with stages
in 5 minutes and 6 seconds
......@@ -115,9 +115,18 @@ class MediaAdminForm(ModelForm):
data = json.loads(
if data and data['totalItems']:
data = data['items'][0]
fetched_item = None
for item in data['items']:
for identifiers in item["volumeInfo"]["industryIdentifiers"]:
if identifiers["identifier"] == isbn:
fetched_item = item
if fetched_item:
if not fetched_item:
return False
# Fill the data
return True
return False
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment