From d31c8ba0f05aa251ac3f4002b5478b39d32e4e59 Mon Sep 17 00:00:00 2001 From: joe-prosser Date: Fri, 26 Jul 2024 16:58:28 +0100 Subject: [PATCH] fix(api): Always serialize assigned (#294) --- CHANGELOG.md | 1 + api/src/resources/comment.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b9cf76..9819288 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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` diff --git a/api/src/resources/comment.rs b/api/src/resources/comment.rs index 647c73a..194a3b3 100644 --- a/api/src/resources/comment.rs +++ b/api/src/resources/comment.rs @@ -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, #[serde(skip_serializing_if = "should_skip_serializing_optional_vec", default)] pub predicted: Option>, @@ -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, }