Skip to content

Commit

Permalink
skip serializing special request if None
Browse files Browse the repository at this point in the history
  • Loading branch information
preyasshah committed Jul 22, 2024
1 parent c6eea2f commit 6ea39ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,25 @@
"chunks": [
{
"__mem_gb": 1,
"__special": null,
"__threads": 1,
"__vmem_gb": null,
"value": 1.0
},
{
"__mem_gb": 1,
"__special": null,
"__threads": 1,
"__vmem_gb": null,
"value": 2.0
},
{
"__mem_gb": 1,
"__special": null,
"__threads": 1,
"__vmem_gb": null,
"value": 3.0
}
],
"join": {
"__mem_gb": null,
"__special": null,
"__threads": null,
"__vmem_gb": null
}
Expand Down
2 changes: 1 addition & 1 deletion martian/src/stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub struct Resource {
threads: Option<isize>,
#[serde(rename = "__vmem_gb")]
vmem_gb: Option<isize>,
#[serde(rename = "__special")]
#[serde(rename = "__special", skip_serializing_if = "Option::is_none")]
special: Option<String>,
}

Expand Down

0 comments on commit 6ea39ea

Please sign in to comment.