mirror of
https://github.com/frappe/books.git
synced 2024-12-23 19:39:07 +00:00
Merge pull request #158 from piyushsinghania/add/skipcache
Added options to skipCacheDocument if ever needed
This commit is contained in:
commit
6a298716d9
4
index.js
4
index.js
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user