def resolve_dict_keywords(keywords):
    """Replace dictionary content with html.

    :param keywords: The keywords.
    :type keywords: dict

    :return: New keywords with updated content.
    :rtype: dict
    """

    for keyword in ['value_map', 'inasafe_fields', 'inasafe_default_values']:
        value = keywords.get(keyword)
        if value:
            value = value.get('content')
            value = KeywordIO._dict_to_row(value).to_html()
            keywords[keyword]['content'] = value

    value_maps = keywords.get('value_maps')
    thresholds = keywords.get('thresholds')
    if value_maps:
        value_maps = value_maps.get('content')
        value_maps = KeywordIO._value_maps_row(value_maps).to_html()
        keywords['value_maps']['content'] = value_maps
    if thresholds:
        thresholds = thresholds.get('content')
        thresholds = KeywordIO._threshold_to_row(thresholds).to_html()
        keywords['thresholds']['content'] = thresholds

    return keywords
def resolve_dict_keywords ( keywords ) : for keyword in [ 'value_map' , 'inasafe_fields' , 'inasafe_default_values' ] : value = keywords . get ( keyword ) if value : value = value . get ( 'content' ) value = KeywordIO . _dict_to_row ( value ) . to_html ( ) keywords [ keyword ] [ 'content' ] = value value_maps = keywords . get ( 'value_maps' ) thresholds = keywords . get ( 'thresholds' ) if value_maps : value_maps = value_maps . get ( 'content' ) value_maps = KeywordIO . _value_maps_row ( value_maps ) . to_html ( ) keywords [ 'value_maps' ] [ 'content' ] = value_maps if thresholds : thresholds = thresholds . get ( 'content' ) thresholds = KeywordIO . _threshold_to_row ( thresholds ) . to_html ( ) keywords [ 'thresholds' ] [ 'content' ] = thresholds return keywords
Replace dictionary content with html.

    :param keywords: The keywords.
    :type keywords: dict

    :return: New keywords with updated content.
    :rtype: dict