summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/cust_location.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/FS/FS/cust_location.pm b/FS/FS/cust_location.pm
index 355bdb081..b12a161db 100644
--- a/FS/FS/cust_location.pm
+++ b/FS/FS/cust_location.pm
@@ -121,6 +121,10 @@ point.
sub new_or_existing {
my $class = shift;
my %hash = ref($_[0]) ? %{$_[0]} : @_;
+ # if coords are empty, then it doesn't matter if they're auto or not
+ if ( !$hash{'latitude'} and !$hash{'longitude'} ) {
+ delete $hash{'coord_auto'};
+ }
foreach ( qw(address1 address2 city county state zip country geocode
disabled ) ) {
# empty fields match only empty fields