From 887a1fa92dd6388ce82ed5b3edbbaf5996f88630 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 2 Aug 2017 21:26:56 +0300 Subject: [PATCH] Fix for check data --- app/Console/Commands/CheckData.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/CheckData.php b/app/Console/Commands/CheckData.php index d75355556de2..25e1ddf9ebcb 100644 --- a/app/Console/Commands/CheckData.php +++ b/app/Console/Commands/CheckData.php @@ -125,10 +125,14 @@ class CheckData extends Command if ($this->option('fix') == 'true') { foreach ($invoices as $invoice) { + $dispatcher = $invoice->getEventDispatcher(); if ($invoice->is_deleted) { $invoice->unsetEventDispatcher(); } - $invoice->markSent(); + $invoice->is_public = true; + $invoice->save(); + $invoice->markInvitationsSent(); + $invoice->setEventDispatcher($dispatcher); } } }