Verified Commit 3f44e5eb authored by Jakob Moser's avatar Jakob Moser
Browse files

Avoid broken back population for now

parent e2a9936c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ def to_row(p: Person) -> tuple[str, str, Text, str]:
        p.name,
        p.cl_account_name,
        Text(balance, style=style),
        ", ".join(card.id for card in p.cards)
        "N/A",
    )


+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ class Card(Retrievable):

    id: Mapped[int] = mapped_column(primary_key=True)
    owner_uuid: Mapped[UUID] = mapped_column(ForeignKey("person.uuid"))
    owner: Mapped[Person] = relationship(back_populates="cards")
    owner: Mapped[Person] = relationship()

    @property
    def primary_key(self) -> int:
+1 −9
Original line number Diff line number Diff line
from typing import TYPE_CHECKING

from babel.numbers import format_currency
from sqlalchemy.orm import Mapped, mapped_column, relationship
from sqlalchemy.orm import Mapped, mapped_column

from poolpay.model.Base import Base

if TYPE_CHECKING:
    from poolpay.model.Card import Card
else:
    Card = "Card"
from poolpay.model.IntLike import IntLike


@@ -32,7 +25,6 @@ class Person(Base):
    name: Mapped[str]
    cl_account_name: Mapped[str] = mapped_column(unique=True)
    balance_cents: Mapped[int] = mapped_column(default=0)
    cards: Mapped[list[Card]] = relationship(back_populates="owner")

    @property
    def balance_str(self) -> str: