mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixed a bug where editing a transaction would lead to unset variables.
This commit is contained in:
parent
6798cea268
commit
a84064663a
@ -292,6 +292,7 @@ class TransactionController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new FireflyException('Method ' . Input::get('post_submit_action') . ' not implemented yet.');
|
throw new FireflyException('Method ' . Input::get('post_submit_action') . ' not implemented yet.');
|
||||||
break;
|
break;
|
||||||
|
@ -167,7 +167,7 @@ class Transaction implements TransactionInterface
|
|||||||
/*
|
/*
|
||||||
* Connect budget and category:
|
* 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];
|
$catids = is_null($category) ? [] : [$category->id];
|
||||||
$journal->budgets()->sync($budgetids);
|
$journal->budgets()->sync($budgetids);
|
||||||
$journal->categories()->sync($catids);
|
$journal->categories()->sync($catids);
|
||||||
|
Loading…
Reference in New Issue
Block a user