draft: category tree building
Tests / test (push) Failing after 12s
Tests / lint (push) Failing after 11s

This commit is contained in:
2026-10-28 07:12:31 +01:00
parent 8a0c98e9bb
commit e0c32319e8
2 changed files with 45 additions and 10 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ from pydantic import Field, computed_field
from sqlalchemy import Date, ForeignKey, Index, Integer, String, UniqueConstraint
from sqlalchemy.orm import Mapped, mapped_column, relationship
from src.models.category import Category
from src.models.common import Amount, ExportBaseModel, IngestdbBase, date2str, hashify
@@ -29,7 +30,8 @@ class Transaction(ExportBaseModel):
other_name: str | None = None
other_iban: str | None = None
# TODO: The Pydantic model should hold a category object, NOT the category id which is owned by the DB
category_id: int | None = None
category: Category | None
category_id: int | None = None # remove!
@computed_field # type: ignore[prop-decorator]
@property