diff --git a/public/js/legacy/widgets/form/fields.js b/public/js/legacy/widgets/form/fields.js index 06b477e9f3..48c98b6fc2 100644 --- a/public/js/legacy/widgets/form/fields.js +++ b/public/js/legacy/widgets/form/fields.js @@ -1295,11 +1295,11 @@ _f.ButtonField.prototype.make_input = function() { var me = this; } _f.ButtonField.prototype.hide = function() { - $dh(this.button_area); + $dh(this.wrapper); }; _f.ButtonField.prototype.show = function() { - $ds(this.button_area); + $ds(this.wrapper); }; diff --git a/webnotes/widgets/query_report.py b/webnotes/widgets/query_report.py index b156e765ea..7b58a07b16 100644 --- a/webnotes/widgets/query_report.py +++ b/webnotes/widgets/query_report.py @@ -68,7 +68,7 @@ def run(report_name, filters=None): + ".report." + scrub(report.name) + "." + scrub(report.name) + ".execute" columns, result = webnotes.get_method(method_name)(filters or {}) - if cint(report.add_total_row): + if cint(report.add_total_row) and result: result = add_total_row(result, columns) return {