fix mistakes
parent
fe823979fd
commit
c9d0395f38
|
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue