diff --git a/invenio/lib/websearch_webinterface.py b/invenio/lib/websearch_webinterface.py index 0bb919fbe1..eca02c2a11 100644 --- a/invenio/lib/websearch_webinterface.py +++ b/invenio/lib/websearch_webinterface.py @@ -715,16 +715,9 @@ def answer(req, form): recid = int(path[0]) else: recid = int(path[0]) - except IndexError: - # display record #1 for URL /CFG_SITE_RECORD without a number - recid = 1 - except ValueError: - if path[0] == '': - # display record #1 for URL /CFG_SITE_RECORD/ without a number - recid = 1 - else: - # display page not found for URLs like /CFG_SITE_RECORD/foo - return None, [] + except: + # 404 for /record/ and /record/foobarbaz + return None, [] from invenio.intbitset import __maxelem__ if recid <= 0 or recid > __maxelem__: