diff --git a/pandora/item/tasks.py b/pandora/item/tasks.py index a7c0c68a..6a33cf0a 100644 --- a/pandora/item/tasks.py +++ b/pandora/item/tasks.py @@ -367,5 +367,5 @@ def bulk_edit(data, username): if item.editable(user): with transaction.atomic(): item.refresh_from_db() - response = edit_item(user, item, data) + response = edit_item(user, item, data, is_task=True) return {} diff --git a/pandora/item/views.py b/pandora/item/views.py index 9fbd39cb..7eff652a 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -533,7 +533,7 @@ def get(request, data): return render_to_json_response(response) actions.register(get) -def edit_item(user, item, data): +def edit_item(user, item, data, is_task=False): data = data.copy() update_clips = False response = json_response(status=200, text='ok') @@ -559,7 +559,7 @@ def edit_item(user, item, data): other_groups = list(groups - user_groups) data['groups'] = [g for g in data['groups'] if g in user_groups] + other_groups r = item.edit(data) - if r: + if r and not is_task: r.wait() if update_clips: tasks.update_clips.delay(item.public_id)