mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-20 01:39:57 +00:00
fix(controllers): guard empty group-by detail row in trends
With an explicit GROUP BY, a zero-match detail query returns no rows (the old bare aggregate returned one all-NULL row), so row1[0][0] would raise IndexError. Skip the entry instead.
This commit is contained in:
@@ -203,6 +203,9 @@ def get_data(filters, conditions):
|
||||
as_list=1,
|
||||
)
|
||||
|
||||
if not row1:
|
||||
continue
|
||||
|
||||
des[ind] = row[i][0]
|
||||
des[ind - 1] = row1[0][0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user