Skip to content

Commit

Permalink
Fixing Auto Assign Task bug when first time run
Browse files Browse the repository at this point in the history
  • Loading branch information
Gisler Garces committed Oct 15, 2019
1 parent b802421 commit d98c259
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ private void manageRuleException(JSONObject rule,RuleConfig ruleConfig,Exception
String exceptionAsString = sw.toString();

//If error happens last important log becomes the previous one.
String lastImportantLog = rule.getString("lastLog");
String ruleName = rule.getString("name");
int ruleId = rule.getInt("id");
String lastImportantLog = rule.has("lastLog") ? rule.getString("lastLog") : "No last log available.";
String ruleName = rule.has("name") ? rule.getString("name") : "No name available.";
int ruleId = rule.has("id") ? rule.getInt("id") : 0;

//Is the second time it fails?
if (statusBeforeRun == TaskRuleExecutionState.ERROR)
Expand Down

0 comments on commit d98c259

Please sign in to comment.