Skip to content

Commit

Permalink
Merge pull request #195 from darthsiroftardis/fix-for-4897
Browse files Browse the repository at this point in the history
Fix for remove of `as_entity_addr`
  • Loading branch information
darthsiroftardis authored Oct 24, 2024
2 parents 385a7b8 + bd46621 commit aef6def
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/cli/dictionary_item_str_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,15 @@ impl<'a> TryFrom<DictionaryItemStrParams<'a>> for DictionaryItemIdentifier {
error,
}
})?;
let entity_addr = key.as_entity_addr().ok_or(CliError::InvalidArgument {
context: "dictionary item entity named key",
error: "not a entity-addr".to_string(),
})?;

let entity_addr = if let Key::AddressableEntity(addr) = key {
addr
} else {
return Err(CliError::InvalidArgument {
context: "dictionary item entity named key",
error: "not a entity-addr".to_string(),
});
};
Ok(DictionaryItemIdentifier::new_from_entity_info(
entity_addr,
dictionary_name.to_string(),
Expand Down

0 comments on commit aef6def

Please sign in to comment.