diff --git a/src/database/entry.rs b/src/database/entry.rs index e14ff3b..5e4a984 100644 --- a/src/database/entry.rs +++ b/src/database/entry.rs @@ -60,6 +60,9 @@ impl TryFrom<&Entry> for models::Entry { type Error = anyhow::Error; fn try_from(e: &Entry) -> Result { + if e.attribute.is_empty() { + return Err(anyhow!("Attribute cannot be empty.")); + } let base_entry = models::Entry { identity: e.address()?.encode()?, entity_searchable: match &e.entity {