This commit was manufactured by cvs2svn to create tag 'freeside_2_1_1'.
[freeside.git] / FS / FS / ClientAPI / Signup.pm
index 7bbdaff..ec45e79 100644 (file)
@@ -608,6 +608,8 @@ sub new_customer {
   } else {
     die "unknown signup service $svc_x";
   }
+  my $y = $svc[0]->setdefault; # arguably should be in new method
+  return { 'error' => $y } if $y && !ref($y);
 
   if ($packet->{'mac_addr'} && $conf->exists('signup_server-mac_addr_svcparts'))
   {
@@ -626,16 +628,15 @@ sub new_customer {
       '_password' => '', #blank as requested (set passwordmin to 0)
     };
 
+    my $y = $svc->setdefault; # arguably should be in new method
+    return { 'error' => $y } if $y && !ref($y);
+
     push @svc, $svc;
 
   }
 
-  foreach my $svc ( @svc ) {
-    my $y = $svc->setdefault; # arguably should be in new method
-    return { 'error' => $y } if $y && !ref($y);
-    #$error = $svc->check;
-    #return { 'error' => $error } if $error;
-  }
+  #$error = $svc->check;
+  #return { 'error' => $error } if $error;
 
   #setup a job dependancy to delay provisioning
   my $placeholder = new FS::queue ( {