Fix relationship with item model from inventory.

This commit is contained in:
Yaro Kasear 2025-07-28 13:16:18 -05:00
parent da60b971f8
commit c93aa973bf

View file

@ -16,7 +16,7 @@ class Item(ValidatableMixin, db.Model):
id: Mapped[int] = mapped_column(Integer, Identity(start=1, increment=1), primary_key=True)
description: Mapped[Optional[str]] = mapped_column(Unicode(255), nullable=True)
inventory: Mapped[List['Inventory']] = relationship('Inventory', back_populates='item')
inventory: Mapped[List['Inventory']] = relationship('Inventory', back_populates='type')
def __init__(self, description: Optional[str] = None):
self.description = description