mirror of
https://github.com/simon987/task_tracker_drone.git
synced 2025-12-14 15:59:03 +00:00
json recipe helper method
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user