From 00fc9c9b1c501f1858e61426efd6c0b6112dfd91 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 30 Aug 2018 12:16:10 +0530 Subject: [PATCH] fix(fetch): fetch_from will always update after save --- frappe/model/base_document.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index 1ff5fc0d0f..fe2165974c 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -451,10 +451,10 @@ class BaseDocument(object): # get a map of values ot fetch along with this link query # that are mapped as link_fieldname.source_fieldname in Options of # Readonly or Data or Text type fields - fields_to_fetch = [ - _df for _df in self.meta.get_fields_to_fetch(df.fieldname) - if not self.get(_df.fieldname) - ] + + # NOTE: All fields will be replaced, if you want manual changes to stay + # use `frm.add_fetch` + fields_to_fetch = self.meta.get_fields_to_fetch(df.fieldname) if not fields_to_fetch: # cache a single value type