[freeside-commits] branch FREESIDE_2_3_BRANCH updated. a40226e5f72ae19a9c59135113b71639e7cfda93

Ivan ivan at 420.am
Fri Sep 28 12:23:24 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  a40226e5f72ae19a9c59135113b71639e7cfda93 (commit)
      from  6656228b824a35b8f23b428b952c26bf16377bc9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a40226e5f72ae19a9c59135113b71639e7cfda93
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Fri Sep 28 12:23:23 2012 -0700

    fix unsuspending packages which didn't have a suspend reason, fallout from #6587

diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index bab2039..fb774c6 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -1361,7 +1361,8 @@ sub unsuspend {
 
   }
 
-  my $reason = $self->last_cust_pkg_reason('susp')->reason;
+  my $cust_pkg_reason = $self->last_cust_pkg_reason('susp');
+  my $reason = $cust_pkg_reason ? $cust_pkg_reason->reason : '';
 
   my %hash = $self->hash;
   my $inactive = time - $hash{'susp'};
@@ -1391,7 +1392,7 @@ sub unsuspend {
 
   my $unsusp_pkg;
 
-  if ( $reason->unsuspend_pkgpart ) {
+  if ( $reason && $reason->unsuspend_pkgpart ) {
     my $part_pkg = FS::part_pkg->by_key($reason->unsuspend_pkgpart)
       or $error = "Unsuspend package definition ".$reason->unsuspend_pkgpart.
                   " not found.";

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_pkg.pm |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list