Skip to content

Commit

Permalink
Make sure ordered_at is evaluated at persist (#3629) (patch)
Browse files Browse the repository at this point in the history
### Fixed

- Ordered_at is updated for each submitted order
  • Loading branch information
islean authored Aug 26, 2024
1 parent 8262312 commit 75b16a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cg/store/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ class Order(Base):
cases: Mapped[list[Case]] = orm.relationship(secondary=order_case, back_populates="orders")
customer_id: Mapped[int] = mapped_column(ForeignKey("customer.id"))
customer: Mapped[Customer] = orm.relationship(foreign_keys=[customer_id])
order_date: Mapped[datetime] = mapped_column(default=datetime.now())
order_date: Mapped[datetime] = mapped_column(default=datetime.now)
ticket_id: Mapped[int] = mapped_column(unique=True, index=True)
workflow: Mapped[str] = mapped_column(types.Enum(*(workflow.value for workflow in Workflow)))
is_delivered: Mapped[bool] = mapped_column(default=False)
Expand Down

0 comments on commit 75b16a9

Please sign in to comment.