From 8cb865d9ecbd386a3ae93bf0fb44a106127d8810 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Wed, 21 Jun 2023 20:56:55 +0530 Subject: [PATCH] Publish path issue --- smart_service/apis/publish_api.py | 12 ++++----- .../transactions/doctype/publish/publish.js | 26 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/smart_service/apis/publish_api.py b/smart_service/apis/publish_api.py index eb71ccf..edeb5d4 100644 --- a/smart_service/apis/publish_api.py +++ b/smart_service/apis/publish_api.py @@ -482,17 +482,17 @@ def new_publish(args, publish_type, vehicle, language, version): prev_full_update_file, file_name, full_update_file_name) get_step_total_count(final_update_file) if file_flag: - # return True, file_name.split("public")[1] - return True, file_name + return True, file_name.split("public")[1] + # return True, file_name else: return False, "File save issue" - # return True, file_name.split("public")[1] - return True, file_name + return True, file_name.split("public")[1] + # return True, file_name except Exception as e: # return "Failed to save file" - # frappe.log_error("Publish",frappe.get_traceback()) - return False, str(frappe.get_traceback(e)) + frappe.log_error("Publish",frappe.get_traceback()) + return False, str(frappe.get_traceback()) @frappe.whitelist() diff --git a/smart_service/transactions/doctype/publish/publish.js b/smart_service/transactions/doctype/publish/publish.js index e2d6eb5..f43d1c6 100644 --- a/smart_service/transactions/doctype/publish/publish.js +++ b/smart_service/transactions/doctype/publish/publish.js @@ -123,7 +123,7 @@ frappe.ui.form.on('Publish', { "version": frm.doc.version }, callback: function (r) { - if (r.message[0]) { + // if (r.message[0]) { frm.set_value('publish_status', 'Published'); frm.page.clear_primary_action("Publish"); frm.set_value('actual_published_date', frappe.datetime.nowdate()); @@ -146,18 +146,18 @@ frappe.ui.form.on('Publish', { } } }); - } - else { - frappe.msgprint({ - title: __('Notification'), - message: __('Not Successfully Published: ' + r.message[1]), - // primary_action: { - // action(values) { - // frm.save('Update'); - // } - // } - }); - } + // } + // else { + // frappe.msgprint({ + // title: __('Notification'), + // message: __('Not Successfully Published: ' + r.message[1]), + // // primary_action: { + // // action(values) { + // // frm.save('Update'); + // // } + // // } + // }); + // } // if (r.message != "Failed to save file") {