this should process default usergroup as well as fixed now
[freeside.git] / httemplate / edit / svc_acct.cgi
index 4b324a5..8d50aed 100755 (executable)
@@ -69,7 +69,11 @@ unless ( $svcnum || $cgi->param('error') ) { #adding
   }
 
   $svc_acct->set_default_and_fixed( {
-    'usergroup' => sub { @groups = split(',', shift ); },
+    #false laziness w/svc-acct::_fieldhandlers
+    'usergroup' => sub { return $_[0] if ref($_[0]) eq 'ARRAY';
+                         @groups = split(/\s*,\s*/, shift );
+                         \@groups;
+                       },
   } );
 
 }