diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-08-05 13:27:25 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-08-05 13:27:25 -0700 |
commit | 47995fbef165464420b2ce1e431be3c846b10f3f (patch) | |
tree | 7e669e32f202569fe205f945109061e08ad8a9d2 /httemplate | |
parent | e3cbf8a241b8d805306c3283a5cd2d30c946733a (diff) |
fix tower sector editing on errors
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/edit/tower.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/edit/tower.html b/httemplate/edit/tower.html index 03b488e86..673a2713a 100644 --- a/httemplate/edit/tower.html +++ b/httemplate/edit/tower.html @@ -32,13 +32,14 @@ my $m2_error_callback = sub { # reconstruct the list my @fields = qw(sectorname ip_addr); map { my $k = $_; - next if !length($cgi->param($k.'_sectorname')); new FS::tower_sector { 'towernum' => $object->towernum, 'sectornum' => scalar( $cgi->param($k) ), map { $_ => scalar( $cgi->param($k.'_'.$_) ) } @fields, }; - } grep /^sectornum\d+$/, ($cgi->param); + } grep length($cgi->param($_.'_sectorname')), + grep /^sectornum\d+$/, + ($cgi->param); }; my $default_ip_addr_callback = sub { |