mirror of
https://github.com/NexVeridian/wikidata-to-surrealdb.git
synced 2025-09-02 09:59:13 +00:00
is_err create
This commit is contained in:
parent
4ea36f78b7
commit
2edaeef042
2 changed files with 31 additions and 15 deletions
|
@ -75,7 +75,7 @@ impl EntityMini {
|
|||
id: Some(get_id_entity(&entity)),
|
||||
label: get_name(&entity),
|
||||
claims: thing_claim,
|
||||
description: get_description(&entity).unwrap_or("".to_string()),
|
||||
description: get_description(&entity),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
@ -129,9 +129,10 @@ fn get_name(entity: &Entity) -> String {
|
|||
.unwrap_or_default()
|
||||
}
|
||||
|
||||
fn get_description(entity: &Entity) -> Option<String> {
|
||||
fn get_description(entity: &Entity) -> String {
|
||||
entity
|
||||
.descriptions
|
||||
.get(&Lang(WIKIDATA_LANG.to_string()))
|
||||
.cloned()
|
||||
.unwrap_or_default()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue