mirror of
https://github.com/frappe/books.git
synced 2024-11-08 23:00:56 +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 SQLiteDatabase from 'frappe/backends/sqlite';
|
||||
import fs from 'fs';
|
||||
import models from '../models';
|
||||
import regionalModelUpdates from '../models/regionalModelUpdates';
|
||||
import postStart, { setCurrencySymbols } from '../server/postStart';
|
||||
import { DB_CONN_FAILURE } from './messages';
|
||||
@ -120,6 +119,7 @@ export async function purgeCache(purgeAll = false) {
|
||||
|
||||
if (purgeAll) {
|
||||
delete frappe.db;
|
||||
const models = (await import('../models')).default;
|
||||
await frappe.initializeAndRegister(models, true);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { ipcRenderer } from 'electron';
|
||||
import frappe from 'frappe';
|
||||
import { createApp } from 'vue';
|
||||
import models from '../models';
|
||||
import App from './App';
|
||||
import FeatherIcon from './components/FeatherIcon';
|
||||
import config, { ConfigKeys } from './config';
|
||||
@ -25,6 +24,7 @@ import { setLanguageMap, stringifyCircular } from './utils';
|
||||
frappe.isServer = true;
|
||||
frappe.isElectron = true;
|
||||
|
||||
const models = (await import('../models')).default;
|
||||
await frappe.initializeAndRegister(models);
|
||||
|
||||
ipcRenderer.send = getErrorHandled(ipcRenderer.send);
|
||||
|
Loading…
Reference in New Issue
Block a user