mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 09:51:40 +00:00
Fix #3630
This commit is contained in:
@@ -200,6 +200,11 @@ class CreateAutoBudgetLimits implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
private function handleAutoBudget(AutoBudget $autoBudget): void
|
private function handleAutoBudget(AutoBudget $autoBudget): void
|
||||||
{
|
{
|
||||||
|
if (null === $autoBudget->budget) {
|
||||||
|
Log::info(sprintf('Auto budget #%d is associated with a deleted budget.', $autoBudget->id));
|
||||||
|
$autoBudget->delete();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!$this->isMagicDay($autoBudget)) {
|
if (!$this->isMagicDay($autoBudget)) {
|
||||||
Log::info(
|
Log::info(
|
||||||
sprintf(
|
sprintf(
|
||||||
@@ -255,8 +260,8 @@ class CreateAutoBudgetLimits implements ShouldQueue
|
|||||||
/**
|
/**
|
||||||
* @param AutoBudget $autoBudget
|
* @param AutoBudget $autoBudget
|
||||||
*
|
*
|
||||||
* @throws FireflyException
|
|
||||||
* @return bool
|
* @return bool
|
||||||
|
* @throws FireflyException
|
||||||
*/
|
*/
|
||||||
private function isMagicDay(AutoBudget $autoBudget): bool
|
private function isMagicDay(AutoBudget $autoBudget): bool
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user