diff --git a/CHANGELOG.md b/CHANGELOG.md index 09d0b68..0af90fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog Changelog file for dinero-rs project, a command line application for managing finances. +## [0.13.1] - 2021-02-27 +### Fixed +- Fixed issue when there is no specified payee ## [0.13.0] - 2021-02-27 ### Added - Improved documentation diff --git a/Cargo.toml b/Cargo.toml index 3f822ad..ec2f489 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dinero-rs" -version = "0.13.0" +version = "0.13.1" authors = ["Claudio Noguera "] edition = "2018" readme = "README.md" diff --git a/src/parser/tokenizers/transaction.rs b/src/parser/tokenizers/transaction.rs index 287931a..2d9e8b4 100644 --- a/src/parser/tokenizers/transaction.rs +++ b/src/parser/tokenizers/transaction.rs @@ -53,8 +53,12 @@ fn parse_with_grammar(tokenizer: &mut Tokenizer) -> Result 0) { - transaction.payee = Some(transaction.description.clone()); + if transaction.payee.is_none() { + if transaction.description.len() > 0 { + transaction.payee = Some(transaction.description.clone()); + } else { + transaction.payee = Some("[Unspecified payee]".to_string()) + } } // Have a flag so that it can be known whether a comment belongs to the transaction or to the // posting