From 42f558833a2f447f123d842c144a39eeb6b09c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Mon, 29 Jun 2020 14:29:18 +0300 Subject: [PATCH] fixed #1503 --- app/Jobs/Setting/UpdateCategory.php | 2 +- app/Jobs/Setting/UpdateTax.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Setting/UpdateCategory.php b/app/Jobs/Setting/UpdateCategory.php index e5c3b8839..360df3aed 100644 --- a/app/Jobs/Setting/UpdateCategory.php +++ b/app/Jobs/Setting/UpdateCategory.php @@ -50,7 +50,7 @@ class UpdateCategory extends Job return; } - if ($this->category->type != $this->request->get('type')) { + if ($this->request->has('type') && ($this->request->get('type') != $this->category->type)) { $message = trans('messages.error.change_type', ['text' => implode(', ', $relationships)]); throw new \Exception($message); diff --git a/app/Jobs/Setting/UpdateTax.php b/app/Jobs/Setting/UpdateTax.php index ff2644e01..95081fb2f 100644 --- a/app/Jobs/Setting/UpdateTax.php +++ b/app/Jobs/Setting/UpdateTax.php @@ -50,7 +50,7 @@ class UpdateTax extends Job return; } - if ($this->tax->type != $this->request->get('type')) { + if ($this->request->has('type') && ($this->request->get('type') != $this->tax->type)) { $message = trans('messages.error.type', ['text' => implode(', ', $relationships)]); throw new \Exception($message);