mirror of
https://github.com/Fabio286/antares.git
synced 2025-01-20 21:01:09 +01:00
fix: unable to set null or delete rows without primary key
This commit is contained in:
parent
df681147aa
commit
39326eb52e
@ -1,4 +1,5 @@
|
||||
// @ts-check
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const https = require('https');
|
||||
|
@ -19,9 +19,9 @@ export class ShortcutRegister {
|
||||
private _mode: ShortcutMode;
|
||||
private static _instance: ShortcutRegister;
|
||||
|
||||
private constructor (args: { mainWindow: BrowserWindow; menuTemplate: OsMenu; mode: ShortcutMode }) {
|
||||
private constructor (args: { mainWindow: BrowserWindow; menuTemplate?: OsMenu; mode: ShortcutMode }) {
|
||||
this._mainWindow = args.mainWindow;
|
||||
this._menuTemplate = args.menuTemplate;
|
||||
this._menuTemplate = args.menuTemplate || {};
|
||||
this._mode = args.mode;
|
||||
this.shortcuts = shortcutsStore.get('shortcuts', defaultShortcuts) as ShortcutRecord[];
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ const deleteSelected = () => {
|
||||
});
|
||||
|
||||
const params = {
|
||||
primary: primaryField.value.name,
|
||||
primary: primaryField.value?.name,
|
||||
schema: getSchema(resultsetIndex.value),
|
||||
table: getTable(resultsetIndex.value),
|
||||
rows
|
||||
@ -389,7 +389,7 @@ const setNull = () => {
|
||||
const row = localResults.value.find((row: any) => selectedRows.value.includes(row._antares_id));
|
||||
|
||||
const params = {
|
||||
primary: primaryField.value.name,
|
||||
primary: primaryField.value?.name,
|
||||
schema: getSchema(resultsetIndex.value),
|
||||
table: getTable(resultsetIndex.value),
|
||||
id: getPrimaryValue(row),
|
||||
|
Loading…
Reference in New Issue
Block a user