Skip to content

Commit

Permalink
fix: remove last char from datetime and time if is a dot
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Mar 20, 2021
1 parent fccfe92 commit e89911b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/customizations/postgresql.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module.exports = {
schedulers: false,
// Settings
databaseEdit: false,
tableSettings: true,
tableSettings: false,
viewSettings: false,
triggerSettings: false,
routineSettings: false,
Expand Down
4 changes: 2 additions & 2 deletions src/main/libs/clients/PostgreSQLClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -1267,8 +1267,8 @@ export class PostgreSQLClient extends AntaresCore {

queryResult = rows.map(row => {
return row.reduce((acc, curr, i) => {
const table = tablesInfo[fields[i].tableID].table;
acc[`${table}.${fields[i].name}`] = curr;
const table = tablesInfo[fields[i].tableID] ? tablesInfo[fields[i].tableID].table : '';
acc[`${table ? `${table}.` : ''}${fields[i].name}`] = curr;
return acc;
}, {});
});
Expand Down
6 changes: 6 additions & 0 deletions src/renderer/components/WorkspaceQueryTableRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,13 @@ export default {
this.isInlineEditor[this.editingField] = false;
let content;
if (!BLOB.includes(this.editingType)) {
if ([...DATETIME, ...TIME].includes(this.editingType)) {
if (this.editingContent.substring(this.editingContent.length - 1) === '.')
this.editingContent = this.editingContent.slice(0, -1);
}
if (this.editingContent === this.$options.filters.typeFormat(this.originalContent, this.editingType, this.editingLength)) return;// If not changed
content = this.editingContent;
}
else { // Handle file upload
Expand Down

0 comments on commit e89911b

Please sign in to comment.