Skip to content

Commit 1a60dae

Browse files
Merge pull request #323 from watson-developer-cloud/mdk/list-helper
Add utility method to convert lists to csv.
2 parents ab2738a + 68ea174 commit 1a60dae

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

watson_developer_cloud/watson_service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ def _convert_model(val):
227227
return val._to_dict()
228228
return val
229229

230+
@staticmethod
231+
def _convert_list(val):
232+
if isinstance(val, list):
233+
return ",".join(val)
234+
return val
235+
230236
@staticmethod
231237
def _encode_path_vars(*args):
232238
return (requests.utils.quote(x, safe='') for x in args)

0 commit comments

Comments
 (0)