Agriculture module corrections (#13438)

* Agriculture module corrections

* Update ternary_plot.js
This commit is contained in:
Charles-Henri Decultot
2018-04-02 07:21:53 +02:00
committed by Nabin Hait
parent c825e914d1
commit 6860036b01
2 changed files with 6 additions and 6 deletions

View File

@@ -15,8 +15,8 @@ frappe.ui.form.on('Soil Texture', {
},
onload: function(frm) {
if (frm.doc.soil_texture_criteria == undefined) frm.call('load_contents');
if (this.ternary_plot) return;
this.ternary_plot = new agriculture.TernaryPlot({
if (frm.doc.ternary_plot) return;
frm.doc.ternary_plot = new agriculture.TernaryPlot({
parent: frm.get_field("ternary_plot").$wrapper,
clay: frm.doc.clay_composition,
sand: frm.doc.sand_composition,