Skip to content

Commit

Permalink
Fix for None set properties (#1345)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbennun committed Aug 4, 2023
1 parent 7ce5fdb commit 7171ecc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dace/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,9 +888,13 @@ def from_string(s):
return [eval(i) for i in re.sub(r"[\{\}\(\)\[\]]", "", s).split(",")]

def to_json(self, l):
if l is None:
return None
return list(sorted(l))

def from_json(self, l, sdfg=None):
if l is None:
return None
return set(l)

def __get__(self, obj, objtype=None):
Expand Down

0 comments on commit 7171ecc

Please sign in to comment.