Skip to content

Commit 9c00b73

Browse files
author
jenkins
committed
2014-10-22 14:35:12 automatic update
1 parent 2e9764d commit 9c00b73

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/server/api/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,10 @@ def search_json_node(request):
320320
result_copy = result.copy()
321321
if 'author' in result_copy.keys():
322322
result_copy['author'] = User.objects.get(pk=result_copy['author']).username
323-
result_copy['cite'] = len(result_copy['REF'])
323+
try:
324+
result_copy['cite'] = len(result_copy['REF'])
325+
except:
326+
result_copy['cite'] = 0
324327
results_data.append(result_copy)
325328

326329
data = json.dumps({'result': results_data})

0 commit comments

Comments
 (0)