diff --git a/views.py b/views.py
index <HASH>..<HASH> 100644
--- a/views.py
+++ b/views.py
@@ -17,7 +17,7 @@
 ## along with Invenio; if not, write to the Free Software Foundation, Inc.,
 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
 
-"""WebSearch Flask Blueprint"""
+"""WebSearch Flask Blueprint."""
 
 from functools import wraps
 from six import iteritems
@@ -200,7 +200,8 @@ def files(recid):
 def file(recid, filename):
     from invenio.modules.documents import api
     record = get_record(recid)
-    duuid = [uuid for (k, uuid) in record['_files'] if k == filename]
+    duuid = [uuid for (k, uuid) in record.get('_documents', [])
+             if k == filename]
     if len(duuid) != 1:
         #TODO log
         abort(404)
records: refactoring fix

* Fixes refactoring problem introduced when renaming '_files' to
  '_documents' in e<I>b<I>e8f1c<I>d<I>c<I>cbe<I>cf<I>c.