2
0
mirror of https://github.com/frappe/books.git synced 2024-12-24 11:55:46 +00:00

Merge pull request #158 from piyushsinghania/add/skipcache

Added options to skipCacheDocument if ever needed
This commit is contained in:
Alan 2022-01-12 11:53:15 +05:30 committed by GitHub
commit 6a298716d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,8 +226,8 @@ module.exports = {
return this.metaCache[doctype];
},
async getDoc(doctype, name) {
let doc = this.getDocFromCache(doctype, name);
async getDoc(doctype, name, options = {skipDocumentCache: false}) {
let doc = options.skipDocumentCache ? null : this.getDocFromCache(doctype, name);
if (!doc) {
doc = new (this.getDocumentClass(doctype))({
doctype: doctype,