From 938975f24139471b86eab7b7cf057eab53a8effe Mon Sep 17 00:00:00 2001 From: RitvikSardana Date: Mon, 30 Dec 2024 13:10:28 +0530 Subject: [PATCH] fix: better way to set empty rows --- helpdesk/api/doc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helpdesk/api/doc.py b/helpdesk/api/doc.py index 84e7af99b..96313de50 100644 --- a/helpdesk/api/doc.py +++ b/helpdesk/api/doc.py @@ -123,7 +123,7 @@ def get_list_data( order_by: str = "modified desc", page_length=20, columns=None, - rows=[], + rows=None, show_customer_portal_fields=False, ): is_default = True @@ -163,7 +163,10 @@ def get_list_data( if doctype == "HD Ticket" else list.default_list_data().get("columns") ) - rows = list.default_list_data().get("rows") or [] + rows = list.default_list_data().get("rows") + + if rows is None: + rows = [] # check if rows has all keys from columns if not add them for column in columns: