origin_visit_status_get_latest expects an int, not Optional[int];
but this error wasn't detected so far because mypy couldn't detect
the type of the function.
The next release of swh.core fixes that issue, so this fix is now
needed to not trigger a mypy error.