diff options
author | John Wiegley <johnw@newartisans.com> | 2009-06-15 17:01:55 +0100 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-06-15 17:51:45 +0100 |
commit | d45b35798cfd6f0aa72889455f9a87502cd00469 (patch) | |
tree | 240c0f8cb36a8a861c10f4dc126073e0f7a612da | |
parent | c9719006bed77c677af6f2d558b5a131a7f9efdd (diff) | |
download | fork-ledger-d45b35798cfd6f0aa72889455f9a87502cd00469.tar.gz fork-ledger-d45b35798cfd6f0aa72889455f9a87502cd00469.tar.bz2 fork-ledger-d45b35798cfd6f0aa72889455f9a87502cd00469.zip |
Ignore attempts to annotate the null commodity
Fixes 04C5E1CA-1B39-4214-81C7-FD5AA785308F
-rw-r--r-- | src/amount.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amount.cc b/src/amount.cc index 7c9a6931..a58cc215 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -740,7 +740,7 @@ void amount_t::annotate(const annotation_t& details) if (! quantity) throw_(amount_error, _("Cannot annotate the commodity of an uninitialized amount")); else if (! has_commodity()) - throw_(amount_error, _("Cannot annotate an amount with no commodity")); + return; // ignore attempt to annotate a "bare commodity if (commodity().annotated) { this_ann = &as_annotated_commodity(commodity()); |