Skip to content

Commit

Permalink
Bugfix crash on statistics when an FDL doesnt have any attached times…
Browse files Browse the repository at this point in the history
…heets
  • Loading branch information
bacca87 committed Jul 31, 2020
1 parent cd67716 commit 378d9ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Great/ViewModels/StatisticsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ private void LoadExpensesData()
var expenses = db.ExpenseAccounts.Where(ea => ea.FDL1.StartDay >= startDate && ea.FDL1.StartDay <= endDate && ea.Status == 2).ToList()
.Select(e => new
{
day = new DayEVM(e.FDL1.Timesheets.FirstOrDefault().Day),
day = new DayEVM(db.Days.SingleOrDefault(d => d.Timestamp == e.FDL1.StartDay)),
expense = new ExpenseAccountEVM(e)
});

Expand Down

0 comments on commit 378d9ef

Please sign in to comment.