0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00

chore(data-warehouse): edit source page fix (#26401)

This commit is contained in:
Eric Duong 2024-11-26 11:34:45 -05:00 committed by GitHub
parent e3ba870704
commit b153330ecf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,7 +4,7 @@ import { forms } from 'kea-forms'
import { loaders } from 'kea-loaders'
import api from 'lib/api'
import posthog from 'posthog-js'
import { SOURCE_DETAILS } from 'scenes/data-warehouse/new/sourceWizardLogic'
import { getErrorsForFields, SOURCE_DETAILS } from 'scenes/data-warehouse/new/sourceWizardLogic'
import { ExternalDataJob, ExternalDataSource, ExternalDataSourceSchema } from '~/types'
@ -116,6 +116,9 @@ export const dataWarehouseSourceSettingsLogic = kea<dataWarehouseSourceSettingsL
forms(({ values, actions }) => ({
sourceConfig: {
defaults: {} as Record<string, any>,
errors: (sourceValues) => {
return getErrorsForFields(values.sourceFieldConfig?.fields ?? [], sourceValues as any)
},
submit: async ({ payload = {} }) => {
const newJobInputs = {
...values.source?.job_inputs,