forked from CGM_Public/pretix_original
Fix rare crash in async task handling (PRETIXEU-4MB)
This commit is contained in:
@@ -106,7 +106,7 @@ class AsyncMixin:
|
|||||||
elif res.state == 'PROGRESS':
|
elif res.state == 'PROGRESS':
|
||||||
data.update({
|
data.update({
|
||||||
'started': True,
|
'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':
|
elif res.state == 'STARTED':
|
||||||
data.update({
|
data.update({
|
||||||
|
|||||||
Reference in New Issue
Block a user