Commit 8d6fcbfd by Jonathan Piacenti

Possible fix for download race condition.

parent 4dcb2aa4
......@@ -172,6 +172,8 @@ class DataExportBlock(XBlock):
return {'error': 'permission denied'}
from .tasks import export_data as export_data_task # Import here since this is edX LMS specific
self._delete_export()
# Make sure we nail down our state before sending off an asynchronous task.
self.save()
if not username:
user_id = None
else:
......
......@@ -26,7 +26,7 @@ function DataExportBlock(runtime, element) {
}
function updateStatus(newStatus) {
var statusChanged = newStatus !== status;
var statusChanged = ! _.isEqual(newStatus, status);
status = newStatus;
if (status.export_pending) {
// Keep polling for status updates when an export is running.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment