fixing writeLog to handle tuples, sets, and None for list arguments

parent 7cef5ceb
......@@ -1061,9 +1061,17 @@ class GraceDb(GsiRest):
# Handle cases where tag_name or displayName are strings
if isinstance(tag_name, str):
tag_name = [tag_name]
elif isinstance(tag_name, (tuple, set)):
tag_name = list(tag_name)
elif tag_name is None:
tag_name = []
if isinstance(displayName, str):
displayName = [displayName]
elif isinstance(displayName, (tuple, set)):
displayName = list(displayName)
elif displayName is None:
displayName = []
# Set up body of request
body = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment