mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Minor fixes for imports
This commit is contained in:
parent
deb55dd6c8
commit
342b383115
@ -36,9 +36,9 @@ class QueryLogging
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Enable query logging for development
|
// Enable query logging for development
|
||||||
// if (!Ninja::isHosted() || !config('beacon.enabled')) {
|
if (!Ninja::isHosted() || !config('beacon.enabled')) {
|
||||||
// return $next($request);
|
return $next($request);
|
||||||
// }
|
}
|
||||||
|
|
||||||
$timeStart = microtime(true);
|
$timeStart = microtime(true);
|
||||||
DB::enableQueryLog();
|
DB::enableQueryLog();
|
||||||
|
@ -192,15 +192,6 @@ class Import implements ShouldQueue
|
|||||||
$array = json_decode(file_get_contents($this->file_path), 1);
|
$array = json_decode(file_get_contents($this->file_path), 1);
|
||||||
$data = $array['data'];
|
$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) {
|
foreach ($this->available_imports as $import) {
|
||||||
if (! array_key_exists($import, $data)) {
|
if (! array_key_exists($import, $data)) {
|
||||||
//throw new ResourceNotAvailableForMigration("Resource {$key} is not available for migration.");
|
//throw new ResourceNotAvailableForMigration("Resource {$key} is not available for migration.");
|
||||||
@ -220,9 +211,7 @@ class Import implements ShouldQueue
|
|||||||
// $this->fixClientBalances();
|
// $this->fixClientBalances();
|
||||||
$check_data = CheckCompanyData::dispatchNow($this->company, md5(time()));
|
$check_data = CheckCompanyData::dispatchNow($this->company, md5(time()));
|
||||||
|
|
||||||
//reset functionality here
|
|
||||||
$this->company->update_products = $update_product_state;
|
|
||||||
$this->company->save();
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
Mail::to($this->user->email, $this->user->name())
|
Mail::to($this->user->email, $this->user->name())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user