def _set_revision_reverse(to_pid, from_pid, is_obsoletes):
    try:
        sciobj_model = d1_gmn.app.model_util.get_sci_model(from_pid)
    except d1_gmn.app.models.ScienceObject.DoesNotExist:
        return
    if not d1_gmn.app.did.is_existing_object(to_pid):
        return
    did_model = d1_gmn.app.did.get_or_create_did(to_pid)
    if is_obsoletes:
        sciobj_model.obsoletes = did_model
    else:
        sciobj_model.obsoleted_by = did_model
    sciobj_model.save()