web/views/workflow.py
changeset 9440 6880674c1a26
parent 9383 7b3fa5a7a5a3
parent 9426 8e87f1e18a37
child 10006 8391bf718485
--- a/web/views/workflow.py	Wed Sep 11 18:04:05 2013 +0200
+++ b/web/views/workflow.py	Tue Jan 21 15:11:16 2014 +0100
@@ -445,6 +445,13 @@
     binary = True
 
     def cell_call(self, row=0, col=0):
-        tmpfile = self._cw.session.data[self._cw.form['tmpfile']]
+        key = self._cw.form['tmpfile']
+        if key not in self._cw.session.data:
+            # the temp file is gone and there's nothing
+            # we can do about it
+            # we should probably write it to some well
+            # behaved place and serve it
+            return
+        tmpfile = self._cw.session.data.pop(key)
         self.w(open(tmpfile, 'rb').read())
         os.unlink(tmpfile)