Skip to content

Commit

Permalink
maybe not all gets are necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
EmanElsaban committed Jan 9, 2025
1 parent 9adc64e commit cde91b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tron/core/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ def serialize_namedtuple(obj):
return json.dumps(
{
"command": state_data["command"],
"cpus": state_data.get("cpus"),
"mem": state_data.get("mem"),
"disk": state_data.get("disk"),
"cpus": state_data["cpus"],
"mem": state_data["mem"],
"disk": state_data["disk"],
"cap_add": state_data["cap_add"],
"cap_drop": state_data["cap_drop"],
"constraints": [
serialize_namedtuple(constraint) for constraint in state_data.get("constraints", [])
], # convert each ConfigConstraint to dictionary, so it would be a list of dicts
"docker_image": state_data.get("docker_image"),
"docker_image": state_data["docker_image"],
"docker_parameters": [
serialize_namedtuple(parameter) for parameter in state_data.get("docker_parameters", [])
],
Expand Down

0 comments on commit cde91b1

Please sign in to comment.