From de67c7a02db2895b37e38a07634324590e951389 Mon Sep 17 00:00:00 2001 From: Bryant Howell Date: Mon, 15 Apr 2019 11:45:18 -0500 Subject: [PATCH] Fixed the view_filter_map algorithm to correctly generate the URLs if using a string or a list of strings --- tableau_rest_api/tableau_rest_api_connection_25.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tableau_rest_api/tableau_rest_api_connection_25.py b/tableau_rest_api/tableau_rest_api_connection_25.py index c567080..2ec801e 100644 --- a/tableau_rest_api/tableau_rest_api_connection_25.py +++ b/tableau_rest_api/tableau_rest_api_connection_25.py @@ -142,7 +142,12 @@ def _query_data_file(self, download_type, view_name_or_luid, high_resolution=Non final_filter_map = {} for key in view_filter_map: new_key = u"vf_{}".format(key) - final_filter_map[new_key] = view_filter_map[key] + # Check if this just a string + if isinstance(view_filter_map[key], basestring): + value = view_filter_map[key] + else: + value = ",".join(map(unicode,view_filter_map[key])) + final_filter_map[new_key] = value additional_url_params = u"?" + urllib.urlencode(final_filter_map) if high_resolution is True: