HomeSoftware Heritage

do not always auto-create an OriginVisitStatus object in origin_visit_add()

Description

do not always auto-create an OriginVisitStatus object in origin_visit_add()

when the OriginVisit object given as argument to be inserted already
have its visit id set (which is usually the case in a replayer-like
session), it makes no sense to auto-add the first OriginVisitStatus
objects related to this visit; this behavior is expected only when the
origin_visit_add() is called from a loading session.

Adapt tests accordingly -- several tests did depend on the auto-add
behavior of the origin_visit_add method for OriginVisit objects which
visit_id is given in the test dataset.

Details