From 435a00f0d53ac309f092c5c9f6b95587f6964176 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 21 Jul 2021 20:01:01 +0000 Subject: [PATCH] --- server/AyaNova/util/Seeder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/AyaNova/util/Seeder.cs b/server/AyaNova/util/Seeder.cs index 77934ae9..3c0c61b4 100644 --- a/server/AyaNova/util/Seeder.cs +++ b/server/AyaNova/util/Seeder.cs @@ -3078,7 +3078,8 @@ namespace AyaNova.Util { var l = CustomerUnits.Where(x => x.Key == customerId).FirstOrDefault();//Fake.Random.Long(1, TotalSeededUnits); var numUnits = l.Value.Count(); - var i = Fake.Random.Int(1, numUnits); + //because faker values are INCLUSIVE and this is going to be used as an index on an array need to -1 each end of the range + var i = Fake.Random.Int(0, numUnits-1); return l.Value[i]; }