Browse Source

Publish path issue

master
venkataakhil 1 year ago
parent
commit
8cb865d9ec
  1. 12
      smart_service/apis/publish_api.py
  2. 26
      smart_service/transactions/doctype/publish/publish.js

12
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()

26
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: __('<b>Not Successfully Published:</b> ' + r.message[1]),
// primary_action: {
// action(values) {
// frm.save('Update');
// }
// }
});
}
// }
// else {
// frappe.msgprint({
// title: __('Notification'),
// message: __('<b>Not Successfully Published:</b> ' + r.message[1]),
// // primary_action: {
// // action(values) {
// // frm.save('Update');
// // }
// // }
// });
// }
// if (r.message != "Failed to save file") {

Loading…
Cancel
Save