From 53edb555dc28af1cac5b76c45978ade566ec9a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Mon, 7 Dec 2015 21:09:54 +0200 Subject: [PATCH] I'll put this back. This works and uses single transaction, clear()/add() uses 2 transactions. --- hc/front/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hc/front/views.py b/hc/front/views.py index d5b4cfc1..66fbee40 100644 --- a/hc/front/views.py +++ b/hc/front/views.py @@ -215,8 +215,7 @@ def channels(request): return HttpResponseForbidden() new_checks.append(check) - channel.checks.clear() - channel.checks.add(*new_checks) + channel.checks = new_checks return redirect("hc-channels") channels = Channel.objects.filter(user=request.user).order_by("created")