mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for self updater (#3740)
* Add checks for duplicate contacts in invitations * Fixes for self updater
This commit is contained in:
parent
8129a5b49d
commit
ed5ce8634e
@ -38,6 +38,8 @@ class PostUpdate extends Command
|
|||||||
{
|
{
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
|
info("running post update");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Artisan::call('migrate');
|
Artisan::call('migrate');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
@ -85,7 +87,7 @@ class PostUpdate extends Command
|
|||||||
$output = $factory->createOutput();
|
$output = $factory->createOutput();
|
||||||
|
|
||||||
$input = new \Symfony\Component\Console\Input\ArrayInput(array(
|
$input = new \Symfony\Component\Console\Input\ArrayInput(array(
|
||||||
'command' => 'update --no-dev',
|
'command' => 'install',
|
||||||
));
|
));
|
||||||
$input->setInteractive(false);
|
$input->setInteractive(false);
|
||||||
echo "<pre>";
|
echo "<pre>";
|
||||||
|
@ -83,6 +83,8 @@ info(print_r($release,1));
|
|||||||
|
|
||||||
info(print_r($res,1));
|
info(print_r($res,1));
|
||||||
|
|
||||||
|
Artisan::call('ninja:post-update');
|
||||||
|
|
||||||
return response()->json(['message'=>$res], 200);
|
return response()->json(['message'=>$res], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,9 @@ class StoreInvoiceRequest extends Request
|
|||||||
|
|
||||||
$rules['client_id'] = 'required|exists:clients,id,company_id,'.auth()->user()->company()->id;
|
$rules['client_id'] = 'required|exists:clients,id,company_id,'.auth()->user()->company()->id;
|
||||||
|
|
||||||
|
$rules['invitations.*.client_contact_id'] = 'distinct';
|
||||||
|
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,11 +140,7 @@ return [
|
|||||||
'post_update' => [
|
'post_update' => [
|
||||||
'ninja:post-update' => [
|
'ninja:post-update' => [
|
||||||
'class' => \App\Console\Commands\PostUpdate::class,
|
'class' => \App\Console\Commands\PostUpdate::class,
|
||||||
'params' => [
|
'params' => []
|
||||||
'log' => 1,
|
|
||||||
'reset' => false,
|
|
||||||
// etc.
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user