Skip to content

Commit 7fd5c5a

Browse files
committed
handle cron schedule in read better
1 parent 2608b82 commit 7fd5c5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/provider/devhub_workflow_resource.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,12 @@ func (r *workflowResource) Read(ctx context.Context, req resource.ReadRequest, r
511511

512512
state.Id = types.StringValue(workflow.Id)
513513
state.Name = types.StringValue(workflow.Name)
514-
state.CronSchedule = types.StringValue(workflow.CronSchedule)
514+
515+
if workflow.CronSchedule != "" {
516+
state.CronSchedule = types.StringValue(workflow.CronSchedule)
517+
} else {
518+
state.CronSchedule = types.StringNull()
519+
}
515520

516521
if workflow.TriggerLinearLabel.Name == "" {
517522
state.TriggerLinearLabelName = types.StringNull()

0 commit comments

Comments
 (0)