Skip to content

Commit

Permalink
Fix false positives in finding marriage records
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 2, 2024
1 parent 63da07d commit 959d64d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -13572,12 +13572,14 @@ sub get_marriage

my $marriage = $person->get_record('marriage') || $person->get_record('fams marriage');
if(!defined($marriage)) {
my @spouses = $person->spouse();
if(scalar(@spouses)) {
# FIXME: only looks at the first spouse
$marriage = $spouses[0]->get_record('marriage') || $spouses[0]->get_record('fams marriage');
return $marriage if(defined($marriage));
}
# Don't do this, because it generates false positives when
# a spouse has marriage records to a different person
# my @spouses = $person->spouse();
# if(scalar(@spouses)) {
# # FIXME: only looks at the first spouse
# $marriage = $spouses[0]->get_record('marriage') || $spouses[0]->get_record('fams marriage');
# return $marriage if(defined($marriage));
# }

my @events = $person->event();
if(scalar(@events) == 1) {
Expand Down

0 comments on commit 959d64d

Please sign in to comment.