Browse Source

Merge pull request #13188 from frappe/mergify/bp/version-13-hotfix/pr-13106

fix: Use docfields from options if no docfields are returned from meta (backport #13106)
version-14
Suraj Shetty 4 years ago
committed by GitHub
parent
commit
6f359bedbc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      frappe/public/js/frappe/form/grid_row.js

+ 2
- 1
frappe/public/js/frappe/form/grid_row.js View File

@@ -7,7 +7,8 @@ export default class GridRow {
$.extend(this, opts);
if (this.doc && this.parent_df.options) {
frappe.meta.make_docfield_copy_for(this.parent_df.options, this.doc.name, this.docfields);
this.docfields = frappe.meta.get_docfields(this.parent_df.options, this.doc.name);
const docfields = frappe.meta.get_docfields(this.parent_df.options, this.doc.name);
this.docfields = docfields.length ? docfields : opts.docfields;
}
this.columns = {};
this.columns_list = [];


Loading…
Cancel
Save