Skip to content

Commit

Permalink
fix(minor): corrected wrong filter condition (backport #41755) (#41762)
Browse files Browse the repository at this point in the history
* fix(minor): corrected wrong filter condition (#41755)

(cherry picked from commit 60eb03a)

# Conflicts:
#	erpnext/assets/report/fixed_asset_register/fixed_asset_register.py

* fix: resolved conflict

---------

Co-authored-by: Khushi Rawat <142375893+khushi8112@users.noreply.github.com>
Co-authored-by: Nabin Hait <nabinhait@gmail.com>
  • Loading branch information
3 people committed Jun 4, 2024
1 parent cd0852f commit a67fa68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def prepare_chart_data(data, filters):
if filters.filter_based_on not in ("Date Range", "Fiscal Year"):
filters_filter_based_on = "Date Range"
date_field = "purchase_date"
filtered_data = [d for d in data if not d.get(date_field)]
filtered_data = [d for d in data if d.get(date_field)]
filters_from_date = min(filtered_data, key=lambda a: a.get(date_field)).get(date_field)
filters_to_date = max(filtered_data, key=lambda a: a.get(date_field)).get(date_field)
else:
Expand Down

0 comments on commit a67fa68

Please sign in to comment.