Skip to content

Commit

Permalink
fix: don't get chart data if data is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchamahabal committed Feb 21, 2023
1 parent ccd2568 commit acdf7fd
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ def get_chart_data(data: List, filters: Filters) -> Dict:
datasets = []
employee_data = data

if not data:
return None

if data and filters.employee:
get_dataset_for_chart(employee_data, datasets, labels)

Expand Down

0 comments on commit acdf7fd

Please sign in to comment.