Skip to content

Commit

Permalink
fix: Replace map() with list comprehension in amazon_sp_api.py and wr…
Browse files Browse the repository at this point in the history
…ap "Retry" button text in __() in ecommerce_integration_log.js
  • Loading branch information
blaggacao committed Oct 2, 2024
1 parent 6309a7a commit 2151bd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def __call__(self, request):
map(lambda H: H.lower(), request.headers.keys()),
)
)
canonical_headers = "".join(map(lambda h: ":".join((h, request.headers[h])) + "\n", headers_to_sign))
canonical_headers = "".join([f"{h}:{request.headers[h]}\n" for h in headers_to_sign])
signed_headers = ";".join(headers_to_sign)

# Combine elements to create canonical request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
frappe.ui.form.on("Ecommerce Integration Log", {
refresh: function (frm) {
if (frm.doc.request_data && frm.doc.status == "Error") {
frm.add_custom_button("Retry", function () {
frm.add_custom_button(__("Retry"), function () {
frappe.call({
method: "ecommerce_integrations.ecommerce_integrations.doctype.ecommerce_integration_log.ecommerce_integration_log.resync",
args: {
Expand Down

0 comments on commit 2151bd1

Please sign in to comment.