mirror of
https://github.com/frappe/books.git
synced 2024-11-12 16:36:27 +00:00
fix: no translation cause of premature import
This commit is contained in:
parent
ca272acc5e
commit
5a66e4aba6
@ -1,7 +1,6 @@
|
|||||||
import config from '@/config';
|
import config from '@/config';
|
||||||
import SQLiteDatabase from 'frappe/backends/sqlite';
|
import SQLiteDatabase from 'frappe/backends/sqlite';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import models from '../models';
|
|
||||||
import regionalModelUpdates from '../models/regionalModelUpdates';
|
import regionalModelUpdates from '../models/regionalModelUpdates';
|
||||||
import postStart, { setCurrencySymbols } from '../server/postStart';
|
import postStart, { setCurrencySymbols } from '../server/postStart';
|
||||||
import { DB_CONN_FAILURE } from './messages';
|
import { DB_CONN_FAILURE } from './messages';
|
||||||
@ -120,6 +119,7 @@ export async function purgeCache(purgeAll = false) {
|
|||||||
|
|
||||||
if (purgeAll) {
|
if (purgeAll) {
|
||||||
delete frappe.db;
|
delete frappe.db;
|
||||||
|
const models = (await import('../models')).default;
|
||||||
await frappe.initializeAndRegister(models, true);
|
await frappe.initializeAndRegister(models, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
import frappe from 'frappe';
|
import frappe from 'frappe';
|
||||||
import { createApp } from 'vue';
|
import { createApp } from 'vue';
|
||||||
import models from '../models';
|
|
||||||
import App from './App';
|
import App from './App';
|
||||||
import FeatherIcon from './components/FeatherIcon';
|
import FeatherIcon from './components/FeatherIcon';
|
||||||
import config, { ConfigKeys } from './config';
|
import config, { ConfigKeys } from './config';
|
||||||
@ -25,6 +24,7 @@ import { setLanguageMap, stringifyCircular } from './utils';
|
|||||||
frappe.isServer = true;
|
frappe.isServer = true;
|
||||||
frappe.isElectron = true;
|
frappe.isElectron = true;
|
||||||
|
|
||||||
|
const models = (await import('../models')).default;
|
||||||
await frappe.initializeAndRegister(models);
|
await frappe.initializeAndRegister(models);
|
||||||
|
|
||||||
ipcRenderer.send = getErrorHandled(ipcRenderer.send);
|
ipcRenderer.send = getErrorHandled(ipcRenderer.send);
|
||||||
|
Loading…
Reference in New Issue
Block a user