From ef07c059ad30def78547562919422925e7686ca6 Mon Sep 17 00:00:00 2001 From: simon987 Date: Sun, 24 Mar 2019 16:20:45 -0400 Subject: [PATCH] json recipe helper method --- src/tt_drone/api.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tt_drone/api.py b/src/tt_drone/api.py index 95126e6..b69cf73 100644 --- a/src/tt_drone/api.py +++ b/src/tt_drone/api.py @@ -53,6 +53,9 @@ class Task: self.assign_time: int = json_obj["assign_time"] self.verification_count: int = json_obj["verification_count"] + def json_recipe(self) -> dict: + return json.loads(self.recipe) + def toJSON(self): return json.dumps({ "id": self.id, "priority": self.priority,