Skip to content

Commit

Permalink
Added sets to JSON encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Collins committed Apr 22, 2020
1 parent 69bee24 commit 9a0f178
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions labthings/server/representations.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class LabThingsJSONEncoder(JSONEncoder):
"""

def default(self, o):
if isinstance(o, set):
return list(o)
return JSONEncoder.default(self, o)


Expand Down

0 comments on commit 9a0f178

Please sign in to comment.