summaryrefslogtreecommitdiffstats
path: root/firefly_cli/commands
diff options
context:
space:
mode:
Diffstat (limited to 'firefly_cli/commands')
-rw-r--r--firefly_cli/commands/transaction.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/firefly_cli/commands/transaction.py b/firefly_cli/commands/transaction.py
index 3ce20f3..60af6f4 100644
--- a/firefly_cli/commands/transaction.py
+++ b/firefly_cli/commands/transaction.py
@@ -39,7 +39,6 @@ def _add_args(p):
p.add_argument("--skip-dupes", dest="skip_dupes", action="store_true",
help="skip if a tx with same amount+date+source+destination exists")
-@registry.command("tx add", help="record a transaction; source/destination resolve to accounts, category/tags auto-create", args=_add_args)
def _resolve_side(ctx, name, acc_id, side):
# Exactly one of name/id per side (mutually exclusive). id path (ISSUES.md
# #2) fetches by id, validating existence; name path resolves as before.
@@ -49,6 +48,7 @@ def _resolve_side(ctx, name, acc_id, side):
f"(got name={name!r}, id={acc_id!r})")
return ctx.resolver.account_by_id(acc_id) if acc_id else ctx.resolver.account(name)
+@registry.command("tx add", help="record a transaction; source/destination resolve to accounts, category/tags auto-create", args=_add_args)
def cmd_add(args, ctx):
src = _resolve_side(ctx, args.source, args.source_id, "from")
dst = _resolve_side(ctx, args.dest, args.dest_id, "to")