From 27908619ef7e365e81439a34e061394132796ebe Mon Sep 17 00:00:00 2001 From: j Date: Mon, 25 Jan 2016 17:16:19 +0530 Subject: [PATCH] end current import task --- oml/item/scan.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oml/item/scan.py b/oml/item/scan.py index fd5a7e5..3a0de75 100644 --- a/oml/item/scan.py +++ b/oml/item/scan.py @@ -215,6 +215,8 @@ def run_import(options=None): if state.activity.get('cancel'): state.activity = {} return + if not state.tasks.connected: + return with db.session(): if listname and listitems: l = List.get(settings.USER_ID, listname)