Fix rare crash in async task handling (PRETIXEU-4MB)

This commit is contained in:
Raphael Michel
2021-06-22 10:57:34 +02:00
parent ecfeae6ad9
commit ecf1a40a5e

View File

@@ -106,7 +106,7 @@ class AsyncMixin:
elif res.state == 'PROGRESS':
data.update({
'started': True,
'percentage': res.result.get('value', 0) if res.result else 0
'percentage': res.result.get('value', 0) if isinstance(res.result, dict) else 0
})
elif res.state == 'STARTED':
data.update({