From 9efbeb924ef209bb443f7cbb2db1d59eb3b6e078 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Sun, 25 Aug 2019 22:11:33 +0530 Subject: [PATCH] fix: Allow to export 0 records --- frappe/public/js/frappe/data_import/data_exporter.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/frappe/public/js/frappe/data_import/data_exporter.js b/frappe/public/js/frappe/data_import/data_exporter.js index e5c234abe4..0532d5b002 100644 --- a/frappe/public/js/frappe/data_import/data_exporter.js +++ b/frappe/public/js/frappe/data_import/data_exporter.js @@ -27,10 +27,6 @@ frappe.data_import.DataExporter = class DataExporter { label: __('Export All Records'), value: 'all' }, - // { - // label: __('Export 10 Records'), - // value: 'last_10_records' - // }, { label: __('Export Filtered Records'), value: 'by_filter' @@ -200,7 +196,6 @@ frappe.data_import.DataExporter = class DataExporter { update_record_count_message() { let export_records = this.dialog.get_value('export_records'); let count_method = { - last_10_records: () => Promise.resolve('10'), all: () => frappe.db.count(this.doctype), by_filter: () => frappe.db.count(this.doctype, { @@ -228,8 +223,6 @@ frappe.data_import.DataExporter = class DataExporter { let $primary_action = this.dialog.get_primary_btn(); if (no_of_records != null) { - $primary_action.prop('disabled', no_of_records === 0); - let label = ''; if (no_of_records === 0) { label = __('Export');