Staging instance, all changes can be removed at any time

Skip to content

storage*.origin_visit_get_random: Return model object instead of dict

This is used by tests.

Just to have a feeling on how hard it is to change the implementation from dict to model objects.

Note that it's particular here as we are returning an optional tuple of OriginVisit and OriginVisitStatus. Whereas before we returned a mixed visit/visit-status dict (which was no longer neither a visit nor a visit status...)

As an incremental change approach, this introduces similar functions to existing ones to manipulate directly model objects (instead of dicts as currently). This does not refactor the common behavior too much yet to avoid impacting the diff size and the other endpoints. This will be eventually dealt with in subsequent diffs.

Related to T645

Test Plan

tox


Migrated from D3594 (view on Phabricator)

Merge request reports

Loading