Skip to content

Commit

Permalink
Merge pull request #1493 from janosimas/b4.0.3
Browse files Browse the repository at this point in the history
fix last commit,
  • Loading branch information
janosimas authored Mar 5, 2018
2 parents 9a65b48 + f3bb6dd commit c6c76ed
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/terrama2/services/alert/core/AlertExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ std::shared_ptr<te::mem::DataSet> terrama2::services::alert::core::AlertExecutor

std::string currentRiskProperty = dateTimeToString(currentDate);

uint32_t currentRisk = std::numeric_limits<uint32_t>::max();
uint32_t currentRisk = terrama2::core::DefaultRiskLevel;
try
{
auto attrValue = resultMap.at(currentRiskProperty).second;
Expand Down Expand Up @@ -185,12 +185,7 @@ std::shared_ptr<te::mem::DataSet> terrama2::services::alert::core::AlertExecutor
}
else
{
// if current risk is not default
// mark as incresed risk
if(!terrama2::core::Risk::isDefault(currentRisk))
dsItem->setInt32(COMPARISON_PROPERTY_NAME, 1);
else
dsItem->setValue(COMPARISON_PROPERTY_NAME, nullptr);
dsItem->setValue(COMPARISON_PROPERTY_NAME, nullptr);
}
}
catch (const std::out_of_range&)
Expand Down

0 comments on commit c6c76ed

Please sign in to comment.