(fix)(headless) fix ModelCreateForm.tsx error (#2214)
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

This commit is contained in:
Antgeek
2025-04-08 20:49:37 +08:00
committed by GitHub
parent 8828964e53
commit d2aa73b85e

View File

@@ -268,7 +268,7 @@ const ModelCreateForm: React.FC<CreateFormProps> = ({
if (!saveState && currentStep < 1) {
forward();
} else {
const { dbName, tableName } = submitForm;
const { catalog ,dbName, tableName } = submitForm;
const queryParams = {
...submitForm,
databaseId: databaseId || modelItem?.databaseId || formDatabaseId,
@@ -278,7 +278,7 @@ const ModelCreateForm: React.FC<CreateFormProps> = ({
modelDetail: {
...submitForm,
queryType: basicInfoFormMode === 'fast' ? 'table_query' : 'sql_query',
tableQuery: dbName && tableName ? `${dbName}.${tableName}` : '',
tableQuery: catalog && dbName && tableName ? `${catalog}.${dbName}.${tableName}` : (dbName && tableName ? `${dbName}.${tableName}` : ''),
sqlQuery: sql,
sqlVariables: sqlParams,
},