diff --git a/service/transformers/CalTransformer.php b/service/transformers/CalTransformer.php index a82f1ee19..2c74f9af0 100644 --- a/service/transformers/CalTransformer.php +++ b/service/transformers/CalTransformer.php @@ -79,8 +79,8 @@ private function addActivity($row, &$count) foreach($activities as &$activity) { - if ((isset($row['act']) && $activity['id'] == $row['act']) || - (! isset($row['act']) && $activity['id'] == $row[-1])) + if ((isset($row['act']) && $activity == $row['act']) || + (! isset($row['act']) && $activity == -1)) { unset($activity); return; diff --git a/service/transformers/LcaTransformer.php b/service/transformers/LcaTransformer.php index 5029a505d..68ee075a8 100644 --- a/service/transformers/LcaTransformer.php +++ b/service/transformers/LcaTransformer.php @@ -107,7 +107,7 @@ private function addActivity($row, &$count) { foreach($activities as &$activity) { - if ($activity['id'] == $row['act']) + if ($activity == $row['act']) { unset($activity); return null; @@ -120,7 +120,7 @@ private function addActivity($row, &$count) { foreach($activities as &$activity) { - if ($activity['id'] == -1) + if ($activity == -1) { unset($activity); return null;