fix mistakes

pull/43/head
eric 2017-03-21 21:16:36 -04:00
parent fe823979fd
commit c9d0395f38
1 changed files with 10 additions and 3 deletions

View File

@ -54,7 +54,14 @@ def isbn_node(isbn):
def work_node(work, facet=None): def work_node(work, facet=None):
metadata = {"@type": "http://schema.org/EBook"}
metadata = {"@type": "http://schema.org/EBook",
"id": "{base}{url}".format(
base=UNGLUEIT_URL,
url=reverse('work_identifier',
kwargs={'work_id':work.id})
)
}
links = [] links = []
images = [] images = []
acquires = [] acquires = []
@ -145,8 +152,8 @@ def work_node(work, facet=None):
metadata["summary"] = work.description metadata["summary"] = work.description
# identifiers # identifiers
if work.identifiers.filter(type='identifier'): if work.identifiers.filter(type='isbn'):
metadata['other_identifiers'] = [isbn_node(isbn.value) metadata['identifiers'] = [isbn_node(isbn.value)
for isbn in work.identifiers.filter(type='isbn')[0:9]] #10 should be more than enough for isbn in work.identifiers.filter(type='isbn')[0:9]] #10 should be more than enough