Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitefc0131

Browse files
fix: fallback to sidebar app id when app id is missing
1 parent028d057 commitefc0131

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎provisioner/terraform/resources.go‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,13 +1023,17 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
10231023
returnnil,xerrors.Errorf("decode coder_ai_task attributes: %w",err)
10241024
}
10251025

1026-
iftask.AppID=="" {
1026+
appID:=task.AppID
1027+
ifappID==""&&len(task.SidebarApp)>0 {
1028+
appID=task.SidebarApp[0].ID
1029+
}
1030+
ifappID=="" {
10271031
returnnil,xerrors.Errorf("coder_ai_task has no app_id defined")
10281032
}
10291033

10301034
aiTasks=append(aiTasks,&proto.AITask{
10311035
Id:task.ID,
1032-
AppId:task.AppID,
1036+
AppId:appID,
10331037
Prompt:task.Prompt,
10341038
})
10351039
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp