mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-17 04:00:48 +01:00
fix: unable to update data on tables missing primary or unique key
This commit is contained in:
parent
0891e7be8c
commit
e0946f04f7
18304
package-lock.json
generated
18304
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -272,6 +272,8 @@ const getSchema = (index: number) => {
|
||||
};
|
||||
|
||||
const getPrimaryValue = (row: any) => {
|
||||
if (!primaryField.value) return null;
|
||||
|
||||
const primaryFieldName = Object.keys(row).find(prop => [
|
||||
primaryField.value.alias,
|
||||
primaryField.value.name,
|
||||
@ -321,7 +323,7 @@ const updateField = (payload: { field: string; type: string; content: any }, row
|
||||
});
|
||||
|
||||
const params = {
|
||||
primary: primaryField.value.name,
|
||||
primary: primaryField.value?.name,
|
||||
schema: getSchema(resultsetIndex.value),
|
||||
table: getTable(resultsetIndex.value),
|
||||
id: getPrimaryValue(orgRow),
|
||||
|
@ -606,17 +606,6 @@ watch(() => props.fields, () => {
|
||||
watch(isTextareaEditor, (val) => {
|
||||
if (val)
|
||||
editorMode.value = langDetector(editingContent.value);
|
||||
// const modelOperations = new ModelOperations();
|
||||
// (async () => {
|
||||
// const detected = await modelOperations.runModel(editingContent.value);
|
||||
// const filteredLanguages = detected.filter(dLang =>
|
||||
// availableLanguages.value.some(aLang => aLang.id === dLang.languageId) &&
|
||||
// dLang.confidence > 0.1
|
||||
// );
|
||||
|
||||
// if (filteredLanguages.length)
|
||||
// editorMode.value = availableLanguages.value.find(lang => lang.id === filteredLanguages[0].languageId).slug;
|
||||
// })();
|
||||
});
|
||||
|
||||
watch(() => props.selected, (isSelected) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user