fix: don't reset the child doc fields value for new record (#10090)

This commit is contained in:
rohitwaghchaure 2020-04-25 10:47:13 +05:30 committed by GitHub
parent ce31e795c9
commit 9c78c5b564
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -587,6 +587,9 @@ class Document(BaseDocument):
if high_permlevel_fields:
self.reset_values_if_no_permlevel_access(has_access_to, high_permlevel_fields)
# If new record then don't reset the values for child table
if self.is_new(): return
# check for child tables
for df in self.meta.get_table_fields():
high_permlevel_fields = frappe.get_meta(df.options).get_high_permlevel_fields()