[#1701] don't sync chal scoring for broken chals

This commit is contained in:
Tyler Renelle
2013-10-31 20:37:56 -07:00
parent dfeae89a07
commit 751ae60342
+1 -1
View File
@@ -81,7 +81,7 @@ function addTask(user, task) {
*/
var syncScoreToChallenge = function(task, delta){
if (!task.challenge || !task.challenge.id) return;
if (!task.challenge || !task.challenge.id || task.challenge.broken) return;
if (task.type == 'reward') return; // we don't want to update the reward GP cost
Challenge.findById(task.challenge.id, function(err, chal){
if (err) throw err;