[#3] ElwigData: Fix import error when no deliveries are present
All checks were successful
Test / Run tests (push) Successful in 2m31s
All checks were successful
Test / Run tests (push) Successful in 2m31s
This commit is contained in:
@ -574,7 +574,10 @@ namespace Elwig.Helpers.Export {
|
||||
var year = json["year"]!.AsValue().GetValue<int>();
|
||||
var lsnr = json["lsnr"]!.AsValue().GetValue<string>();
|
||||
var did = currentLsNrs.GetValueOrDefault(lsnr, -1);
|
||||
if (did == -1) did = ++currentDids[year];
|
||||
if (did == -1) {
|
||||
if (!currentDids.ContainsKey(year)) currentDids[year] = 0;
|
||||
did = ++currentDids[year];
|
||||
}
|
||||
currentLsNrs[lsnr] = did;
|
||||
return (new Delivery {
|
||||
Year = year,
|
||||
|
Reference in New Issue
Block a user