1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Minor fixes for imports

This commit is contained in:
David Bomba 2021-04-29 12:12:44 +10:00
parent deb55dd6c8
commit 342b383115
2 changed files with 4 additions and 15 deletions

View File

@ -36,9 +36,9 @@ class QueryLogging
{
// Enable query logging for development
// if (!Ninja::isHosted() || !config('beacon.enabled')) {
// return $next($request);
// }
if (!Ninja::isHosted() || !config('beacon.enabled')) {
return $next($request);
}
$timeStart = microtime(true);
DB::enableQueryLog();

View File

@ -192,15 +192,6 @@ class Import implements ShouldQueue
$array = json_decode(file_get_contents($this->file_path), 1);
$data = $array['data'];
// disable some functionality here:
// 1. disable update_products
$update_product_state = $this->company->update_products;
$this->company->update_products = false;
$this->company->save();
foreach ($this->available_imports as $import) {
if (! array_key_exists($import, $data)) {
//throw new ResourceNotAvailableForMigration("Resource {$key} is not available for migration.");
@ -220,9 +211,7 @@ class Import implements ShouldQueue
// $this->fixClientBalances();
$check_data = CheckCompanyData::dispatchNow($this->company, md5(time()));
//reset functionality here
$this->company->update_products = $update_product_state;
$this->company->save();
try{
Mail::to($this->user->email, $this->user->name())