@@ -18,6 +18,7 @@ defmodule LightningWeb.WorkflowLive.Collaborate do
1818 alias Lightning.Workflows.WebhookAuthMethod
1919 alias Lightning.Workflows.Workflow
2020 alias LightningWeb.Channels.WorkflowJSON
21+ alias LightningWeb.CredentialLive
2122
2223 on_mount ( { LightningWeb.Hooks , :project_scope } )
2324 on_mount ( { LightningWeb.Hooks , :check_limits } )
@@ -45,6 +46,8 @@ defmodule LightningWeb.WorkflowLive.Collaborate do
4546 show_credential_modal: false ,
4647 credential_schema: nil ,
4748 credential_to_edit: nil ,
49+ new_credential_project_credentials:
50+ CredentialLive.Helpers . default_project_credentials ( project ) ,
4851 show_webhook_auth_modal: false ,
4952 webhook_auth_method: nil ,
5053 ai_assistant_enabled: AiAssistant . enabled? ( )
@@ -223,11 +226,7 @@ defmodule LightningWeb.WorkflowLive.Collaborate do
223226 % Lightning.Credentials.Credential {
224227 schema: @ credential_schema ,
225228 user_id: @ current_user . id ,
226- project_credentials: [
227- % Lightning.Projects.ProjectCredential {
228- project_id: @ project . id
229- }
230- ]
229+ project_credentials: @ new_credential_project_credentials
231230 }
232231 }
233232 on_save = {
0 commit comments