check error status of final $cdr->set_status just in case, RT#15535
authorivan <ivan>
Thu, 5 Jan 2012 20:06:59 +0000 (20:06 +0000)
committerivan <ivan>
Thu, 5 Jan 2012 20:06:59 +0000 (20:06 +0000)
FS/FS/part_pkg/voip_cdr.pm

index 31a9218..e74ed0e 100644 (file)
@@ -412,7 +412,8 @@ sub calc_usage {
       # at this point we officially Do Not Care about the rating method
       $charges += $cdr->rated_price;
       $formatter->append($cdr);
-      $cdr->set_status('done');
+      my $error = $cdr->set_status('done');
+      die $error if $error;
     }
   }