from typing import Dict


def _run_compatibility_patches(json_data: Dict) -> Dict:
    """Patch the incoming JSON to make it compatible.

    Over time the structure of the JSON information used to dump a workflow
    has changed. These patches are to guarantee that an old workflow is
    compliant with the new structure. The patches applied are:

    1. Change action.target_url from None to ''

    :param json_data: Json object to process
    :return: Modified json_data
    """
    # Target_url field in actions should be present an empty by default
    for action_obj in json_data['actions']:
        if action_obj.get('target_url') is None:
            action_obj['target_url'] = ''

    return json_data