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

Refactor for backup update console command

This commit is contained in:
David Bomba 2022-02-25 15:38:06 +11:00
parent ec374eec63
commit 86c43c58b9

View File

@ -77,10 +77,10 @@ class BackupUpdate extends Command
{
set_time_limit(0);
Backup::whereRaw('html_backup != "" OR html_backup IS NOT NULL')->chunk(5000, function ($backups) {
Backup::whereRaw('html_backup IS NOT NULL')->chunk(5000, function ($backups) {
foreach ($backups as $backup) {
if($backup->activity->client()->exists()){
if(strlen($backup->html_backup) > 1 && $backup->activity->client()->exists()){
$client = $backup->activity->client;
$backup->storeRemotely($backup->html_backup, $client);