From: Bjørn Rustad Date: Mon, 26 Aug 2013 10:59:41 +0000 (+0200) Subject: Director stacking points bug X-Git-Url: http://git.rustad.me/?a=commitdiff_plain;h=78b27371bad4f5e6fe1be308a22ae867a617c598;p=duplo Director stacking points bug --- 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++; }