fix for fodder_maize
All checks were successful
FarmMaps.Develop/CarbonLib/pipeline/head This commit looks good

This commit is contained in:
2021-06-24 16:22:41 +02:00
parent f684bf72b2
commit 6554e059df
3 changed files with 27 additions and 4 deletions

View File

@@ -34,6 +34,25 @@ namespace FarmMapsAPI.Carbon.Models
}
}
public void AddOrUpdateValue((string, int, string) key, string column, double value)
{
if (TrippleKeyParam.ContainsKey(key))
{
if (TrippleKeyParam[key].Any(x => x.Key == column))
{
TrippleKeyParam[key].Single(x => x.Key == column).Value = value;
}
else
{
TrippleKeyParam[key].Add(new ColumnValue(column, value));
}
}
else
{
TrippleKeyParam.Add(key, new List<ColumnValue> { new ColumnValue(column, value) });
}
}
public void AddValueSkipIfColumnExists((string, int, string) key, string column, double value)
{
if (TrippleKeyParam.ContainsKey(key))