A quick hack to fix a problem.

I had this in my checkout and was using it, noted with a FIXME.
This commit is contained in:
Bradley M. Kuhn 2016-12-07 17:08:59 -08:00
parent bf00eeca74
commit 4737e02745

View file

@ -419,6 +419,7 @@ sub setPreferredPostalAddress($$$) {
foreach my $em (keys %{$ems}) { foreach my $em (keys %{$ems}) {
$anotherPreferred = 1 if $ems->{$em}{preferred}; $anotherPreferred = 1 if $ems->{$em}{preferred};
$postalAddressId = $ems->{$em}{id} if $em eq $postalAddress; $postalAddressId = $ems->{$em}{id} if $em eq $postalAddress;
last if $anotherPreferred; #FIXME: THIS HAS TO HAPPEN IT IS A BUG NEEDS A TEST .. francois caused bug
} }
return undef if not defined $postalAddressId; return undef if not defined $postalAddressId;