(domain, app_id, id_map)
return []
Adds a new set of overrides that's a copy of existing overrides.
    id_map has keys that are the existing ids and values that are the corresponding ids to add.
Adds a new set of overrides that's a copy of existing overrides.
    id_map has keys that are the existing ids and values that are the corresponding ids to add.
Adds a new set of overrides that s a copy of existing overrides . id_map has keys that are the existing ids and values that are the corresponding ids to add .
def copy_xform_resource_overrides(domain, app_id, id_map):
    """
    Adds a new set of overrides that's a copy of existing overrides.
    id_map has keys that are the existing ids and values that are the corresponding ids to add.
    """
    pre_to_post_map = {}
    for pre_id, override in get_xform_resource_overrides(domain, app_id).items():
        # If the app already has an override for a form unique id in the old app...
        if pre_id in id_map.keys():
            # ...then add the same override, for the same form in the new app
            pre_to_post_map[id_map[pre_id]] = override.post_id

    if pre_to_post_map:
        return add_xform_resource_overrides(domain, app_id, pre_to_post_map)

    return []
def copy_xform_resource_overrides ( domain , app_id , id_map ) : pre_to_post_map = { } for pre_id , override in get_xform_resource_overrides ( domain , app_id ) . items ( ) : # If the app already has an override for a form unique id in the old app... if pre_id in id_map . keys ( ) : # ...then add the same override, for the same form in the new app pre_to_post_map [ id_map [ pre_id ] ] = override . post_id if pre_to_post_map : return add_xform_resource_overrides ( domain , app_id , pre_to_post_map ) return [ ]