mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-23 14:26:58 +00:00
Fixed a bug where editing a transaction would lead to unset variables.
This commit is contained in:
@@ -167,7 +167,7 @@ class Transaction implements TransactionInterface
|
||||
/*
|
||||
* Connect budget and category:
|
||||
*/
|
||||
$budgetids = is_null($budget) ? [] : [$budget->id];
|
||||
$budgetids = !isset($budget) || (isset($budget) && is_null($budget)) ? [] : [$budget->id];
|
||||
$catids = is_null($category) ? [] : [$category->id];
|
||||
$journal->budgets()->sync($budgetids);
|
||||
$journal->categories()->sync($catids);
|
||||
|
Reference in New Issue
Block a user