Skip to content

Commit

Permalink
Correct issue in to_list reset an indiciator
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanFauble committed Dec 5, 2023
1 parent be8fcf1 commit c12bc54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion synapseclient/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,15 +340,16 @@ def is_date(dt):

def to_list(value):
"""Convert the value (an iterable or a scalar value) to a list."""
possible_datetime = None
if isinstance(value, collections.abc.Iterable) and not isinstance(value, str):
values = []
for val in value:
possible_datetime = None
if isinstance(val, str):
possible_datetime = datetime_or_none(value)
values.append(val if possible_datetime is None else possible_datetime)
return values
else:
possible_datetime = None
if isinstance(value, str):
possible_datetime = datetime_or_none(value)
return [value if possible_datetime is None else possible_datetime]
Expand Down

0 comments on commit c12bc54

Please sign in to comment.