Fix bug handling ptags in hledger output
Actual output from hledger is a list of tuples.
This commit is contained in:
parent
33c1e9eb9d
commit
ea6e328bfb
@ -12,4 +12,4 @@ ENV LEDGER_FILE=/data/all.ledger
|
||||
ENV OUTPUT_FILE=/data/all.sqlite
|
||||
ENV OVERWRITE_OUTPUT=true
|
||||
|
||||
ENTRYPOINT ["python", "/code/export.py"]
|
||||
ENTRYPOINT ["python", "/code/main.py"]
|
||||
|
@ -130,7 +130,7 @@ def write_transactions(cursor: sqlite3.Cursor, txs: List[Transaction]) -> None:
|
||||
posting.get("paccount"),
|
||||
get_posting_amount(posting),
|
||||
posting.get("pstatus"),
|
||||
",".join(posting.get("ptags") or []),
|
||||
",".join([":".join(x) for x in posting.get("ptags") or []]),
|
||||
posting.get("pcomment"),
|
||||
],
|
||||
)
|
||||
|
@ -34,7 +34,7 @@ class Posting(typing.TypedDict):
|
||||
pdate2: str | None
|
||||
poriginal: str | None
|
||||
pstatus: str # TODO: Enum?
|
||||
ptags: List[str]
|
||||
ptags: List[List[str]]
|
||||
ptransaction_: int
|
||||
ptype: str # TODO: Enum?
|
||||
|
||||
|
Reference in New Issue
Block a user