summaryrefslogtreecommitdiff
path: root/FS/FS/svc_phone.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-05-05 16:44:26 -0700
committerMark Wells <mark@freeside.biz>2013-05-05 16:44:45 -0700
commit786d21e09d1f11c8976a8d45ef734d2d0a100ee7 (patch)
tree1fea237df00454bceada22b02e703492f1b2459d /FS/FS/svc_phone.pm
parent1daf1a670d3cdfb307271fb7c7c98c83fb1fb464 (diff)
allow certain minor location edits without moving packages, #940
Diffstat (limited to 'FS/FS/svc_phone.pm')
-rw-r--r--FS/FS/svc_phone.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm
index 3cc1adc66..bab8537bb 100644
--- a/FS/FS/svc_phone.pm
+++ b/FS/FS/svc_phone.pm
@@ -288,9 +288,8 @@ sub insert {
#false laziness w/cust_pkg.pm... move this to location_Mixin? that would
#make it more of a base class than a mixin... :)
- if ( $options{'cust_location'}
- && ( ! $self->locationnum || $self->locationnum == -1 ) ) {
- my $error = $options{'cust_location'}->insert;
+ if ( $options{'cust_location'} ) {
+ my $error = $options{'cust_location'}->find_or_insert;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return "inserting cust_location (transaction rolled back): $error";