diff --git a/app/Model/DecayingModel.php b/app/Model/DecayingModel.php index 154957c0f..5d3c9ab1c 100644 --- a/app/Model/DecayingModel.php +++ b/app/Model/DecayingModel.php @@ -449,10 +449,9 @@ class DecayingModel extends AppModel $sightings = $this->Sighting->listSightings($user, $attribute_id, 'attribute', false, 0, false); if (empty($sightings)) { $sightings = array(array('Sighting' => array('date_sighting' => $attribute['Attribute']['timestamp']))); // simulate a Sighting nonetheless - } else { - foreach ($sightings as $i => $sighting) { - $sightings[$i]['Sighting']['rounded_timestamp'] = $this->round_timestamp_to_hour($sighting['Sighting']['date_sighting']); - } + } + foreach ($sightings as $i => $sighting) { + $sightings[$i]['Sighting']['rounded_timestamp'] = $this->round_timestamp_to_hour($sighting['Sighting']['date_sighting']); } // get start time $start_time = $attribute['Attribute']['timestamp'];