|
@@ -10,7 +10,7 @@
|
|
|
$contentData = json_decode($section->content_data, true);
|
|
|
|
|
|
if(!isset($contentData['weights'])){
|
|
|
- $contentData['weights'] = [];
|
|
|
+ $contentData['weightLog'] = [];
|
|
|
}
|
|
|
|
|
|
|
|
@@ -22,7 +22,13 @@ $currentWeight = [
|
|
|
'effectiveDate' => $effectiveDate
|
|
|
];
|
|
|
|
|
|
-$weightLog = $contentData['weightLog'];
|
|
|
+
|
|
|
+$weightLog = [];
|
|
|
+
|
|
|
+if(isset($contentData['weightLog'])){
|
|
|
+ $weightLog = $contentData['weightLog'];
|
|
|
+}
|
|
|
+
|
|
|
$weightLog[] = $currentWeight;
|
|
|
|
|
|
|