Fix a bug leading to loss of answers for addon-related questions

This commit is contained in:
Raphael Michel
2017-12-11 21:38:42 +01:00
parent d7ce46c14a
commit 8e7eab636f
2 changed files with 30 additions and 0 deletions

View File

@@ -769,6 +769,9 @@ class OrderPosition(AbstractPosition):
'order_code': order.code
})
# Delete afterwards. Deleting in between might cause deletion of things related to add-ons
# due to the deletion cascade.
for cartpos in cp:
cartpos.delete()
return ops