dvdl16 / woocommerce_fusion

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

[BUG] Error Log: list index out of range #112

Open dvdl16 opened 3 months ago

dvdl16 commented 3 months ago

Current Behavior

In some scenario, a list index out of range error is logged. Further investigation is required

On client CC, see app/error-log/ncq1bsjpft and error-log/na9ibevju7

Steps To Reproduce

TBD

Expected Behavior

Error should be handled

Anything else?

Traceback (most recent call last):
  File "apps/woocommerce_fusion/woocommerce_fusion/tasks/sync_sales_orders.py", line 139, in run
    self.get_corresponding_sales_order_or_woocommerce_order()
  File "apps/woocommerce_fusion/woocommerce_fusion/tasks/sync_sales_orders.py", line 158, in get_corresponding_sales_order_or_woocommerce_order
    self.woocommerce_order = wc_orders[0]
                             ~~~~~~~~~^^^
IndexError: list index out of range

Environment and Versions

Agriculture: v0.0.1
Customisations for x: v1.2.3
Frappe CRM: v1.19.0
South Africa Customisations: v0.1.6
ERPNext: v15.27.7
Frappe Framework: v15.29.2
Helpdesk: v0.10.0
Frappe HR: v15.22.3
WooCommerce Fusion: v1.7.2

Operating System

Windows

What browsers are you seeing the problem on?

No response