Commit 5efefb6 Gerald Baulig
committed
1 parent a88b0be commit 5efefb6 Copy full SHA for 5efefb6
File tree 1 file changed +10
-6
lines changed
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -581,18 +581,22 @@ export class InvoiceService
581
581
shop => this . redis . get ( `invoice:counter:${ shop . id } ` ) . then (
582
582
( counter : any ) => ( {
583
583
id : shop . id ,
584
- counter : Number . parseInt ( counter . toString ( ) )
584
+ counter : Number ( counter )
585
585
} )
586
586
)
587
587
) ) . then (
588
588
counters => {
589
589
this . invoice_number_srv . upsert (
590
590
{
591
- items : counters . map ( item => ( {
592
- id : item . id ,
593
- shop_id : item . id ,
594
- counter : item . counter ,
595
- } ) ) ,
591
+ items : counters . filter (
592
+ item => Number . isInteger ( item . counter )
593
+ ) . map (
594
+ item => ( {
595
+ id : item . id ,
596
+ shop_id : item . id ,
597
+ counter : item . counter ,
598
+ } )
599
+ ) ,
596
600
total_count : counters . length ,
597
601
subject : aggregation . subject
598
602
} ,
You can’t perform that action at this time.
0 commit comments