Skip to content

Commit

Permalink
fix(api): Always serialize assigned (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-prosser authored Jul 26, 2024
1 parent fba30bf commit d31c8ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add `--resume-on-error` flag when creating annotations
- Remove `--use-moon-forms` flag
- Add `--resume-on-error` flag when creating comments / emails
- Serialize assigned on moon_forms if empty vec

# v0.28.0
- Add general fields to `create datasets`
Expand Down
4 changes: 2 additions & 2 deletions api/src/resources/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ pub struct MoonFormLabelCaptures {
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct MoonForm {
pub group: LabelGroupName,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
#[serde(default)]
pub assigned: Vec<MoonFormLabelCaptures>,
#[serde(skip_serializing_if = "should_skip_serializing_optional_vec", default)]
pub predicted: Option<Vec<MoonFormLabelCaptures>>,
Expand All @@ -804,7 +804,7 @@ pub struct NewMoonFormLabelCaptures {
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq)]
pub struct NewMoonForm {
pub group: LabelGroupName,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
#[serde(default)]
pub assigned: Vec<NewMoonFormLabelCaptures>,
}

Expand Down

0 comments on commit d31c8ba

Please sign in to comment.