From bb3bf5ebd42b6538064f1fb9432e21b69ed6250c Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Wed, 27 Jul 2022 15:12:52 +0200 Subject: [PATCH] Island: Check for a set representation and return a list --- monkey/monkey_island/cc/services/representations.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monkey/monkey_island/cc/services/representations.py b/monkey/monkey_island/cc/services/representations.py index e21fcdb25..2fbdf6299 100644 --- a/monkey/monkey_island/cc/services/representations.py +++ b/monkey/monkey_island/cc/services/representations.py @@ -22,6 +22,8 @@ class APIEncoder(JSONEncoder): return value.name if issubclass(type(value), IJSONSerializable): return loads(value.__class__.to_json(value)) + if issubclass(type(value), set): + return list(value) try: return JSONEncoder.default(self, value) except TypeError: