This commit is contained in:
@@ -3078,7 +3078,8 @@ namespace AyaNova.Util
|
|||||||
{
|
{
|
||||||
var l = CustomerUnits.Where(x => x.Key == customerId).FirstOrDefault();//Fake.Random.Long(1, TotalSeededUnits);
|
var l = CustomerUnits.Where(x => x.Key == customerId).FirstOrDefault();//Fake.Random.Long(1, TotalSeededUnits);
|
||||||
var numUnits = l.Value.Count();
|
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];
|
return l.Value[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user