File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -508,7 +508,8 @@ sub computeChecksum {
508
508
509
509
# Prepare to postpone full inventory when required
510
510
my $postpone = 0;
511
- $postpone = (($last_state -> get(' _postpone_count' ) // 0) + 1) % ($postpone_config +1)
511
+ my $current_count = $last_state -> get(' _postpone_count' ) // ' 0' ;
512
+ $postpone = ($current_count =~ / ^\d +$ / ? int ($current_count )+1 : 1) % ($postpone_config +1)
512
513
if $postpone_config ;
513
514
514
515
# Always disable postpone if format is not json
Original file line number Diff line number Diff line change @@ -564,7 +564,7 @@ sub _feedInventory {
564
564
if $versionprovider ;
565
565
566
566
# Don't compute checksum on partial inventory or with glpi-inventory script
567
- $self -> {inventory }-> computeChecksum($self -> {config }-> {' full-inventory-postpone' })
567
+ $self -> {inventory }-> computeChecksum($self -> {config }-> {' full-inventory-postpone' } =~ / ^ \d + $ / ? int ( $self -> { config } -> { ' full-inventory-postpone ' }) : 0 )
568
568
unless $self -> {partial } || $self -> {nochecksum };
569
569
}
570
570
You can’t perform that action at this time.
0 commit comments