From 3f65b2350b3314d9724c5478638fe55984f0600e Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Wed, 24 Jun 2026 10:36:28 +0200 Subject: [PATCH] PaymentVariantService: Fix crash in GenerateEbics() --- Elwig/Services/PaymentVariantService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Elwig/Services/PaymentVariantService.cs b/Elwig/Services/PaymentVariantService.cs index 13150c2..8d0c6d8 100644 --- a/Elwig/Services/PaymentVariantService.cs +++ b/Elwig/Services/PaymentVariantService.cs @@ -226,7 +226,7 @@ namespace Elwig.Services { public static async Task GenerateEbics(int year, int avnr) { using var ctx = new AppDbContext(); - var v = (await ctx.PaymentVariants.FindAsync(year, avnr))!; + var v = await ctx.PaymentVariants.Include(v => v.Credits).Where(v => v.Year == year && v.AvNr == avnr).SingleAsync(); var withoutIban = v.Credits.Count(c => c.Member.Iban == null); if (withoutIban > 0) {