diff --git a/backend/server/src/models/answer.rs b/backend/server/src/models/answer.rs index e4fb1d9a..4fa71579 100644 --- a/backend/server/src/models/answer.rs +++ b/backend/server/src/models/answer.rs @@ -45,8 +45,8 @@ pub enum AnswerData { impl AnswerData { pub async fn validate(self) -> Result<()> { match self { - Self::ShortAnswer(text) => if text.len() <= 0 {bail!("Empty answer")}, - Self::MultiSelect(data) => if data.len() <= 0 {bail!("Empty answer")}, + Self::ShortAnswer(text) => if text.len() == 0 { bail!("Empty answer") }, + Self::MultiSelect(data) => if data.len() == 0 { bail!("Empty answer") }, _ => {}, }