Переглянути джерело

Stat trees - fix goal undefined bug

Vijayakrishnan 3 роки тому
батько
коміт
3d811f7ea9
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      app/Http/Controllers/StatTreeController.php

+ 2 - 2
app/Http/Controllers/StatTreeController.php

@@ -660,8 +660,8 @@ class StatTreeController extends Controller
         $statTreeLine->tree_order_position_index = $position;
         $statTreeLine->last_refresh_count = null;
         $statTreeLine->tsv_text_for_report_columns = null;
-        $statTreeLine->goal_condition = (!$line->goalCondition ? null : $line->goalCondition);
-        $statTreeLine->goal_percent = ($line->goalPercent === -1 ? null : $line->goalPercent);
+        $statTreeLine->goal_condition = (!@$line->goalCondition ? null : $line->goalCondition);
+        $statTreeLine->goal_percent = (!@$line->goalPercent || $line->goalPercent === -1 ? null : $line->goalPercent);
         $statTreeLine->parent_stat_tree_line_id = $parentLine ? $parentLine->id : null;
         $statTreeLine->save();