don't set an empty externalFlag
[freeside.git] / FS / FS / part_export / communigate_pro.pm
index 2370e31..54a8277 100644 (file)
@@ -88,10 +88,12 @@ sub CreateAccount {
   my $accountType  = delete $args{'accountType'};
   my $externalFlag = delete $args{'externalFlag'};
   $args{'AccessModes'} = [ split(' ', $args{'AccessModes'}) ];
-  @args = ( accountName => $accountName, [
-                                           settings     => \%args,
-                                           accountType  => $accountType,
-                                           externalFlag => $externalFlag, ] );
+  @args = ( accountName => $accountName,
+            accountType  => $accountType,
+            settings     => \%args,
+          );
+            #externalFlag => $externalFlag,
+  push @args, externalFlag => $externalFlag if $externalFlag;
 
   communigate_pro_command( $machine, $port, $login, $password, $method, @args );