Fix relationship with item model from inventory.
This commit is contained in:
parent
da60b971f8
commit
c93aa973bf
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue