Skip to content

Commit

Permalink
Merge pull request #120 from ArttuKuikka/fix-ig
Browse files Browse the repository at this point in the history
fix ig
  • Loading branch information
ArttuKuikka authored Oct 14, 2024
2 parents 43401a1 + ceb9bf2 commit bbfda1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Controllers/IGController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task<IActionResult> Index(int? Year, int? Week)
model.Päivät = viikonekapaiva.ToString("dd.MM") + "-" + viikonperjantai.ToString("dd.MM");


model.Ruokalista = db.Ruokalista.Where(m => m.Year == vuosi)?.FirstOrDefault(k => k.WeekId == viikko) ?? throw new Exception($"Ruokalista for week {viikko} was null!!!");
model.Ruokalista = db.Ruokalista.Where(m => m.Year == vuosi)?.FirstOrDefault(k => k.WeekId == viikko) ?? return NotFound("Tämäm viikon ruokalistaa ei ole olemassa");

return View(model);
}
Expand Down

0 comments on commit bbfda1e

Please sign in to comment.