Don't try to download the result when an error occured processing the job.
authorJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Thu, 11 Nov 2010 15:41:12 +0000 (15:41 +0000)
committerJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Thu, 11 Nov 2010 15:41:12 +0000 (15:41 +0000)
bin/djais/views.py

index e2d78b9aa993e1320e4ce29c308e136298834b70..2a0b0905504d80c9f1d70ccdc0c58e9b8d479ddd 100644 (file)
@@ -717,6 +717,9 @@ def job_get(request, jobid):
         job.archive_time = datetime.utcnow()
         job.save()
 
+    if job.result:
+        # Error occured
+         return HttpResponseRedirect('/job/%s/' % job.id)
     extension = os.path.splitext(job.friendly_filename)[-1]
     return HttpResponseRedirect('/job_result/%s%s/%s' % (job.id, extension, job.friendly_filename))