Skip to content

Commit

Permalink
fix: better way to set empty rows
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikSardana committed Dec 30, 2024
1 parent ec07610 commit 938975f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions helpdesk/api/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 938975f

Please sign in to comment.