mirror of
https://github.com/Steffo99/greed.git
synced 2024-11-24 14:54:18 +00:00
fix orderitem-order relation warning
This commit is contained in:
parent
6a70a45211
commit
262eea2b38
1 changed files with 2 additions and 2 deletions
|
@ -241,7 +241,7 @@ class Order(DeferredReflection, TableDeclarativeBase):
|
||||||
# Refund reason: if null, product hasn't been refunded
|
# Refund reason: if null, product hasn't been refunded
|
||||||
refund_reason = Column(Text)
|
refund_reason = Column(Text)
|
||||||
# List of items in the order
|
# List of items in the order
|
||||||
items: typing.List["OrderItem"] = relationship("OrderItem")
|
items: typing.List["OrderItem"] = relationship("OrderItem", back_populates="order")
|
||||||
# Extra details specified by the purchasing user
|
# Extra details specified by the purchasing user
|
||||||
notes = Column(Text)
|
notes = Column(Text)
|
||||||
# Linked transaction
|
# Linked transaction
|
||||||
|
@ -297,7 +297,7 @@ class OrderItem(DeferredReflection, TableDeclarativeBase):
|
||||||
product = relationship("Product")
|
product = relationship("Product")
|
||||||
# The order in which this item is being purchased
|
# The order in which this item is being purchased
|
||||||
order_id = Column(Integer, ForeignKey("orders.order_id"), nullable=False)
|
order_id = Column(Integer, ForeignKey("orders.order_id"), nullable=False)
|
||||||
order = relationship("Order")
|
order = relationship("Order", back_populates="items")
|
||||||
|
|
||||||
# Extra table parameters
|
# Extra table parameters
|
||||||
__tablename__ = "orderitems"
|
__tablename__ = "orderitems"
|
||||||
|
|
Loading…
Reference in a new issue