From 5341c38ce2695a888c02a3b4cee581065ef023ea Mon Sep 17 00:00:00 2001 From: csawatzky Date: Fri, 15 Aug 2025 15:51:12 -0600 Subject: [PATCH] correction for when there is no data for the graph to use the correct inventory (settings or status) --- src/bin/graphs/BinLevelOverTime.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/graphs/BinLevelOverTime.tsx b/src/bin/graphs/BinLevelOverTime.tsx index 58ce4d6..1756a60 100644 --- a/src/bin/graphs/BinLevelOverTime.tsx +++ b/src/bin/graphs/BinLevelOverTime.tsx @@ -110,7 +110,7 @@ export default function BinLevelOverTime(props: Props) { } }); if (data.length === 0) { - let bushels = bin.settings.inventory?.grainBushels ?? 0; + let bushels = bin.bushels(); let currentTime = moment().valueOf(); data.push({ value: fertilizerBin @@ -166,7 +166,7 @@ export default function BinLevelOverTime(props: Props) { }); }); if (autoBarData.length === 0) { - let bushels = bin.settings.inventory?.grainBushels ?? 0; + let bushels = bin.bushels(); let currentTime = moment().valueOf(); autoBarData.push({ value: fertilizerBin