Skip to content

Commit

Permalink
WebSearch: no headers for deleted records
Browse files Browse the repository at this point in the history
* Avoids populating title/description/keyword HTML headers for
  deleted records.
  (closes inveniosoftware#1682)

Signed-off-by: Samuele Kaplun <[email protected]>
  • Loading branch information
kaplun committed Oct 3, 2014
1 parent 4acc073 commit 6fea1fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/websearch/lib/websearch_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,11 @@ def tmpl_record_page_header_content(self, req, recid, ln):

_ = gettext_set_language(ln)

from invenio.search_engine import record_exists

if record_exists(recid) < 1:
return ('', '', '')

title = get_fieldvalues(recid, "245__a") or \
get_fieldvalues(recid, "111__a")

Expand Down

0 comments on commit 6fea1fc

Please sign in to comment.