mirror of
https://github.com/simon987/task_tracker_drone.git
synced 2025-04-19 18:26:43 +00:00
json recipe helper method
This commit is contained in:
parent
626e3a203e
commit
ef07c059ad
@ -53,6 +53,9 @@ class Task:
|
|||||||
self.assign_time: int = json_obj["assign_time"]
|
self.assign_time: int = json_obj["assign_time"]
|
||||||
self.verification_count: int = json_obj["verification_count"]
|
self.verification_count: int = json_obj["verification_count"]
|
||||||
|
|
||||||
|
def json_recipe(self) -> dict:
|
||||||
|
return json.loads(self.recipe)
|
||||||
|
|
||||||
def toJSON(self):
|
def toJSON(self):
|
||||||
return json.dumps({
|
return json.dumps({
|
||||||
"id": self.id, "priority": self.priority,
|
"id": self.id, "priority": self.priority,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user