DS Blank wrote
> I'm trying to track down the cause of a database corruption, and
> noticed in check.py that when a child has no reference to a family,
> the child is removed from the family:
> Wouldn't it be better to add the family to the child, if possible? The
> current behavior seems wrong.
> Anyone know why this is the way that it is?
I haven't looked at the code again recently, but I seem to recall that it
has found a reference in one direction, but not in the reverse direction,
and it removes the reference that does exist - as far as I recall it does
not remove the person (which might be suggested by the message).
I think that asserting that a child belongs to a family might be regarded as
a strong claim that needs adequate evidence. If there is doubt, as
exemplified by the link going in only one direction, it is safer to remove
the link, rather than reinforce the possibly doubtful assertion of a
relationship by adding the link in the other direction. After all, the user
(if he understands the messages!!!) can insert the two way relationship
himself if he believes it to be correct.
Note that import which has been cleaned up for 3.4.0 (thanks Michiel Nauta)
checks for certain references that are incorrect in the imported file. See
bug 5466 though the solution has been applied to all sorts of import,
especially GEDCOM not just XML: "one of the most common bugs we run into:
the user imports a file, the file does not fully comply with the standard,
the import routine does not complain and the user finds out that his family
tree is malformed long after the import by doing something, like sorting,
merging, generating a report or whatever". See the discussion in the bug on
whether to ask the user to fix it.
We decided to automatically correct the error if necessary (AFAIR) on
import rather than remove the link, so not the same as the check and repair
tool. I think the different choice here can be justified on the grounds that
the problem is probably due to a failure in the exporting program which has
not output all the information correctly, though the existence of part of
the information implies that it believes the link to exist, so we trust the
assertion from the imported file.
(The situation in 5466 relates to missing objects, but I think that the fix
considers some other incorrect data as well, hence why it is related to this
View this message in context: http://gramps.1791082.n4.nabble.com/Why-does-check-py-remove-rather-than-fix-tp4655799p4655857.html
Sent from the GRAMPS - Dev mailing list archive at Nabble.com.