Fix control object without state
Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -54,6 +54,7 @@ func (s Service) CreateControl(
|
|||||||
FrameworkID: req.FrameworkID,
|
FrameworkID: req.FrameworkID,
|
||||||
Name: req.Name,
|
Name: req.Name,
|
||||||
Description: req.Description,
|
Description: req.Description,
|
||||||
|
State: coredata.ControlStateNotStarted,
|
||||||
ContentRef: req.ContentRef,
|
ContentRef: req.ContentRef,
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
@@ -63,7 +64,7 @@ func (s Service) CreateControl(
|
|||||||
StateTransition: coredata.StateTransition[coredata.ControlState]{
|
StateTransition: coredata.StateTransition[coredata.ControlState]{
|
||||||
ID: controlStateTransitionID,
|
ID: controlStateTransitionID,
|
||||||
FromState: nil,
|
FromState: nil,
|
||||||
ToState: coredata.ControlStateNotStarted,
|
ToState: control.State,
|
||||||
Reason: ref.Ref("Initial state"),
|
Reason: ref.Ref("Initial state"),
|
||||||
CreatedAt: now,
|
CreatedAt: now,
|
||||||
UpdatedAt: now,
|
UpdatedAt: now,
|
||||||
|
|||||||
Reference in New Issue
Block a user