From c0cab079bc4ef0cf371378e29617669ff5ba4bb5 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 20 May 2014 19:03:58 +0200 Subject: [PATCH] trigger ativity after cancel --- oml/item/api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/oml/item/api.py b/oml/item/api.py index 77a99bc..c2bcc17 100644 --- a/oml/item/api.py +++ b/oml/item/api.py @@ -14,6 +14,7 @@ import query import models import settings import state +from websocket import trigger_event import meta @@ -251,5 +252,10 @@ actions.register(_import, 'import', cache=False) def cancelImport(data): state.activity['cancel'] = True + trigger_event('activity', { + 'activity': 'import', + 'progress': [0, 0], + 'status': {'code': 200, 'text': 'canceled'} + }) return {} actions.register(cancelImport, cache=False)