From 78b27371bad4f5e6fe1be308a22ae867a617c598 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Rustad?= Date: Mon, 26 Aug 2013 12:59:41 +0200 Subject: [PATCH] Director stacking points bug --- lib/Duplo/Points.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/Duplo/Points.pm b/lib/Duplo/Points.pm index 7078e22..5c75156 100644 --- a/lib/Duplo/Points.pm +++ b/lib/Duplo/Points.pm @@ -338,13 +338,11 @@ sub calculate { VALUES (?, ?, ?) "); - $update = $dbh->prepare(" - UPDATE + $dbh->do(" + DELETE FROM director_stage - SET points = points + ? WHERE stage = ? - AND director = ? - "); + ", undef, $stage); my $i = 1; for my $res (@{ $finish_ref }) { @@ -357,7 +355,6 @@ sub calculate { } $insert->execute($p, $stage, $res->{'team'}) - or $update->execute($p, $stage, $res->{'team'}); $i++; } -- 2.47.3