Skip to content

Commit

Permalink
fix(api): remove required and type from moon label def (#249)
Browse files Browse the repository at this point in the history
* fix(api): remove required and type from moon label def
  • Loading branch information
joe-prosser authored Jan 18, 2024
1 parent ecec086 commit f861d86
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
3 changes: 0 additions & 3 deletions api/src/resources/label_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,4 @@ pub struct NewLabelDefPretrained {
pub struct MoonFormFieldDef {
pub name: String,
pub kind: String,
pub required: bool,
#[serde(rename = "type")]
pub field_type: String,
}
4 changes: 2 additions & 2 deletions cli/tests/test_comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ fn check_comments_lifecycle(comments_str: &str, args: Vec<&str>) {
}

// Test getting a comment by id to check the content matches
let test_comment = annotated_comments.get(0).unwrap().comment.clone();
let test_comment = annotated_comments.first().unwrap().comment.clone();
let output = cli.run([
"get",
"comment",
Expand All @@ -111,7 +111,7 @@ fn check_comments_lifecycle(comments_str: &str, args: Vec<&str>) {
"delete",
"comments",
&format!("--source={}", source.identifier()),
&annotated_comments.get(0).unwrap().comment.id.0,
&annotated_comments.first().unwrap().comment.id.0,
]);
assert!(output.is_empty());

Expand Down
4 changes: 0 additions & 4 deletions cli/tests/test_datasets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ fn test_create_update_dataset_custom() {
moon_form: Some(vec![MoonFormFieldDef {
name: "luna".to_owned(),
kind: "ent".to_owned(),
required: false,
field_type: "string".to_owned(),
}]),
},
],
Expand All @@ -270,8 +268,6 @@ fn test_create_update_dataset_custom() {
moon_form: Some(vec![MoonFormFieldDef {
name: "luna".to_owned(),
kind: "ent".to_owned(),
required: false,
field_type: "string".to_owned(),
}]),
},
],
Expand Down

0 comments on commit f861d86

Please sign in to comment.