fix state droopdown not appearing for new voip innovations integrations, RT#15150
authorivan <ivan>
Mon, 13 Feb 2012 03:43:21 +0000 (03:43 +0000)
committerivan <ivan>
Mon, 13 Feb 2012 03:43:21 +0000 (03:43 +0000)
httemplate/elements/select-state.html

index 785b2ec..490dafa 100644 (file)
@@ -72,7 +72,9 @@ if ( $opt{'svcpart'} ) {
   $sth->execute or die $sth->errstr;
   my %avail_states = map { $_->[0] => 1 } @{ $sth->fetchall_arrayref };
 
-  delete $states{$_} foreach grep ! $avail_states{$_}, keys %states;
+  if ( %avail_states ) {
+    delete $states{$_} foreach grep ! $avail_states{$_}, keys %states;
+  }
 }
 
 </%init>