Fix missing key.

This commit is contained in:
James Cole 2020-08-17 14:54:56 +02:00
parent c34a00b3f3
commit 6b279398b3
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -338,7 +338,7 @@ class BudgetLimitRepository implements BudgetLimitRepositoryInterface
{
$budgetLimit->amount = $data['amount'] ?? $budgetLimit->amount;
$budgetLimit->budget_id = $data['budget_id'] ?? $budgetLimit->id;
$budgetLimit->budget_id = $data['budget'] ? $data['budget']->id : $budgetLimit->budget_id;
$budgetLimit->budget_id = array_key_exists('budget_id', $data) ? $data['budget_id']->id : $budgetLimit->budget_id;
$budgetLimit->start_date = $data['start'] ? $data['start']->format('Y-m-d 00:00:00') : $budgetLimit->start_date;
$budgetLimit->end_date = $data['end'] ? $data['end']->format('Y-m-d 00:00:00') : $budgetLimit->end_date;