fix: convert dict to list for iteration (#18963)

diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
index fd364e8..cc4ccc5 100755
--- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
+++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
@@ -71,7 +71,7 @@
 		Helper function that removes all keys from a dictionary (d),
 	that have an empty value.
 	"""
-	for key in d.keys():
+	for key in list(d):
 		if not d[key]:
 			del d[key]
 	return d