(rd, parameters)
Add path parameters when using sub-resources.
Add path parameters when using sub-resources.
Add path parameters when using sub - resources .
def add_parameters_dr(rd, parameters):
    """ Add path parameters when using sub-resources."""
    lookup_field = re.match(r"^.*\{(.*)\}.*$", rd["url"])
    if lookup_field:
        lookup_field = lookup_field.group(1)

        if "data_relation" in rd["schema"][lookup_field]:
            dr = rd["schema"][lookup_field]["data_relation"]
            parameters.append(get_ref_parameter(app.config["DOMAIN"][dr["resource"]]))
def add_parameters_dr ( rd , parameters ) : lookup_field = re . match ( r"^.*\{(.*)\}.*$" , rd [ "url" ] ) if lookup_field : lookup_field = lookup_field . group ( 1 ) if "data_relation" in rd [ "schema" ] [ lookup_field ] : dr = rd [ "schema" ] [ lookup_field ] [ "data_relation" ] parameters . append ( get_ref_parameter ( app . config [ "DOMAIN" ] [ dr [ "resource" ] ] ) )