diff options
author | ivan <ivan> | 2003-03-11 10:41:52 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-03-11 10:41:52 +0000 |
commit | 8df8fb820c0cd6559ee6fef3adffaf43df167353 (patch) | |
tree | adcec5dd76c80880499747306b1369313ca735b8 | |
parent | 97320dbd0747826bc4082a466cfe0ea4e8168628 (diff) |
another pg7.3 fix
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 851d3aa4d..dee356250 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -131,11 +131,12 @@ my $columns = 3; my @part_svc = qsearch( 'part_svc', { 'disabled' => '' } ); foreach my $part_svc ( @part_svc ) { my $svcpart = $part_svc->svcpart; - my $pkg_svc = qsearchs( 'pkg_svc', { - 'pkgpart' => $cgi->param('clone') || $part_pkg->pkgpart, + my $pkgpart = $cgi->param('clone') || $part_pkg->pkgpart; + my $pkg_svc = $pkgpart && qsearchs( 'pkg_svc', { + 'pkgpart' => $pkgpart, 'svcpart' => $svcpart, } ) || new FS::pkg_svc ( { - 'pkgpart' => $cgi->param('clone') || $part_pkg->pkgpart, + 'pkgpart' => $pkgpart, 'svcpart' => $svcpart, 'quantity' => 0, }); |