From 3ffff7d32cf1d69b8a7848228872c58c6c17f213 Mon Sep 17 00:00:00 2001 From: mr Date: Thu, 6 Feb 2025 09:56:00 +0100 Subject: [PATCH] workflow execution evolved --- models/order/order.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/models/order/order.go b/models/order/order.go index ec268ee..37e41e2 100644 --- a/models/order/order.go +++ b/models/order/order.go @@ -90,7 +90,8 @@ func (o *Order) draftStoreFromModel(scheduler *workflow_execution.WorkflowSchedu if request == nil { return errors.New("no request found") } - if scheduler.Workflow.Graph == nil { // if the workflow has no graph, return an error + fmt.Println("Drafting order", scheduler.Workflow) + if scheduler.Workflow == nil || scheduler.Workflow.Graph == nil { // if the workflow has no graph, return an error return errors.New("no graph found") } o.SetName() @@ -321,4 +322,5 @@ func (d *PeerItemOrder) GetPrice(request *tools.APIRequest) (float64, error) { return p * float64(d.Quantity), nil } +// WTF HOW TO SELECT THE RIGHT PRICE ??? // SHOULD SET A BUYING STATUS WHEN PAYMENT IS VALIDATED