From 7ef12f1078bae78477eccbff008ac3f27e10c428 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Wed, 11 Jun 2025 13:56:44 -0600 Subject: [PATCH] changing determination of empty to being less than 5 bushels because if hte auto inventory sets it to 0 it causes null issues between golang and the DB --- src/models/Bin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/Bin.ts b/src/models/Bin.ts index 177997a..c66d8f9 100644 --- a/src/models/Bin.ts +++ b/src/models/Bin.ts @@ -96,7 +96,7 @@ export class Bin { } public empty(): boolean { - return this.settings.inventory?.empty || this.settings.inventory?.grainBushels === 0; + return this.settings.inventory?.empty || (this.settings.inventory !== undefined && this.settings.inventory !== null && this.settings.inventory.grainBushels < 5); } public objectType(): pond.ObjectType {