mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-22 12:04:00 +00:00
Fixed a bug where editing a transaction would lead to unset variables.
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user