avoid noise on upgrades
authorIvan Kohler <ivan@freeside.biz>
Wed, 11 Sep 2013 08:41:23 +0000 (01:41 -0700)
committerIvan Kohler <ivan@freeside.biz>
Wed, 11 Sep 2013 08:41:23 +0000 (01:41 -0700)
FS/FS/Upgrade.pm

index 056b80b..037c4b3 100644 (file)
@@ -86,10 +86,10 @@ sub upgrade_config {
 
   # if there's a USPS tools login, assume that's the standardization method
   # you want to use
-  if ( length($conf->config('usps_webtools-userid')) > 0 and
-       !$conf->exists('address_standardize_method') ) {
-    $conf->set('address_standardize_method', 'usps');
-  }
+  $conf->set('address_standardize_method', 'usps')
+    if $conf->exists('usps_webtools-userid')
+    && length($conf->config('usps_webtools-userid')) > 0
+    && ! $conf->exists('address_standardize_method');
 
 }