diff --git a/app/models.py b/app/models.py index 7cf8c37..7576751 100644 --- a/app/models.py +++ b/app/models.py @@ -12,6 +12,9 @@ class Vendor(db.Model): def get_line_items(self): return db.session.execute(select(LineItem).where(LineItem.vendor_id==self.id)).all() + + def __repr__(self) -> str: + return f'{self.name}' class BudgetCategory(db.Model): __tablename__ = 'budget_category' diff --git a/app/templates/index.html b/app/templates/index.html index d9a2bde..bce6c2a 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -65,7 +65,7 @@ {{li[0].parent_line_item_id}} {{li[0].amount}} {{li[0].currency_type}} - {{li[0].vendor_id}} + {{li[0].get_vendor()[0]}} {{li[0].date}} {{li[0].confirmation_code}} {{li[0].note}}