|
@@ -43,7 +43,7 @@ def construct_body(result):
|
43
|
43
|
title = result['title']
|
44
|
44
|
|
45
|
45
|
# construct content body
|
46
|
|
- content = """{title}<br />{authors} {journal} <strong>{volume}</strong> {page} ({year})"""
|
|
46
|
+ content = """{title} - {authors} {journal} ({volume}) {page} ({year})"""
|
47
|
47
|
|
48
|
48
|
# replace placeholders with actual content
|
49
|
49
|
try:
|
|
@@ -84,15 +84,18 @@ def response(resp):
|
84
|
84
|
continue
|
85
|
85
|
if result['status'] == 'OBS':
|
86
|
86
|
# expand title to add some sort of warning message
|
87
|
|
- title = gettext('{title} (OBSOLETE)').format(title=result['title'])
|
88
|
|
- superseded_url = pdbe_entry_url.format(pdb_id=result['superseded_by'])
|
|
87
|
+ title = gettext('{title} (OBSOLETE)').format(title=result['title'])
|
|
88
|
+ try:
|
|
89
|
+ superseded_url = pdbe_entry_url.format(pdb_id=result['superseded_by'])
|
|
90
|
+ except:
|
|
91
|
+ continue
|
89
|
92
|
|
90
|
93
|
# since we can't construct a proper body from the response, we'll make up our own
|
91
|
94
|
msg_superseded = gettext("This entry has been superseded by")
|
92
|
|
- content = '<em>{msg_superseded} \<a href="{url}">{pdb_id}</a></em>'.format(
|
|
95
|
+ content = '{msg_superseded}: {url} ({pdb_id})'.format(
|
93
|
96
|
msg_superseded=msg_superseded,
|
94
|
97
|
url=superseded_url,
|
95
|
|
- pdb_id=result['superseded_by'], )
|
|
98
|
+ pdb_id=result['superseded_by'])
|
96
|
99
|
|
97
|
100
|
# obsoleted entries don't have preview images
|
98
|
101
|
img_src = None
|