From 6d851ca8157ac65d32e37e18defa274bc4d9ad19 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 2 Aug 2017 21:27:16 +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 fd3f8543df1a..a2d73d29561d 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); } } }