dvdl16 / woocommerce_fusion

WooCommerce connector for ERPNext v15
https://finfoot.tech
Other
19 stars 17 forks source link

[BUG] WooCommerce Error when trying to open WooCommerce Order with Advanced Shipment Tracking turned on #89

Closed dvdl16 closed 3 months ago

dvdl16 commented 3 months ago

Current Behavior

Trying to open a WooCommerce Order linked to a site with "Advanced Shipment Tracking plugin" raises an error

Steps To Reproduce

  1. Go to "WooCommerce Order List"
  2. Open an order
  3. See error

Expected Behavior

No error should appear

Anything else?

Traceback (most recent call last):
  File "apps/woocommerce_fusion/woocommerce_fusion/woocommerce/doctype/woocommerce_order/woocommerce_order.py", line 129, in get_additional_order_attributes
    shipment_trackings_meta_data = next(
                                   ^^^^^
  File "apps/woocommerce_fusion/woocommerce_fusion/woocommerce/doctype/woocommerce_order/woocommerce_order.py", line 130, in <genexpr>
    (entry for entry in order["meta_data"] if entry["key"] == "_wc_shipment_tracking_items"),
                                              ~~~~~^^^^^^^
TypeError: string indices must be integers, not 'str'

Environment and Versions

Agriculture: v0.0.1
Customisations for [redacted]: v1.2.3
South Africa Customisations: v0.1.6
ERPNext: v15.27.7
Frappe Framework: v15.29.2
Frappe HR: v15.22.3
WooCommerce Fusion: v1.5.4

Operating System

Windows

What browsers are you seeing the problem on?

Firefox