web/views/idownloadable.py
changeset 4382 6fb02edd05da
parent 4252 6c4f109c2b03
child 5421 8167de96c523
--- a/web/views/idownloadable.py	Tue Jan 26 20:29:52 2010 +0100
+++ b/web/views/idownloadable.py	Tue Jan 26 20:30:35 2010 +0100
@@ -68,7 +68,7 @@
 
     def set_request_content_type(self):
         """overriden to set the correct filetype and filename"""
-        entity = self.complete_entity(0)
+        entity = self.cw_rset.complete_entity(0, 0)
         encoding = entity.download_encoding()
         if encoding in BINARY_ENCODINGS:
             contenttype = 'application/%s' % encoding
@@ -80,7 +80,7 @@
                                   encoding=encoding)
 
     def call(self):
-        self.w(self.complete_entity(0).download_data())
+        self.w(self.cw_rset.complete_entity(0, 0).download_data())
 
 
 class DownloadLinkView(EntityView):