Skip to content

Commit

Permalink
fix: minor issue
Browse files Browse the repository at this point in the history
(cherry picked from commit b60c57a)
  • Loading branch information
vishdha authored and mergify[bot] committed Nov 9, 2023
1 parent 935286f commit 0eab723
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,11 @@ def add_customer_filters(

if self.filters.get("customer_group"):
groups = get_customer_group_with_children(self.filters.customer_group)
customers = qb.from_(self.customer).select(self.customer.name).where(self.customer['customer_group'].isin(groups))
customers = (
qb.from_(self.customer)
.select(self.customer.name)
.where(self.customer["customer_group"].isin(groups))
)
self.qb_selection_filter.append(self.ple.party.isin(customers))

if self.filters.get("territory"):
Expand Down Expand Up @@ -1135,6 +1139,7 @@ def get_exchange_rate_revaluations(self):
)
self.err_journals = [x[0] for x in results] if results else []


def get_customer_group_with_children(customer_groups):
if not isinstance(customer_groups, list):
customer_groups = [d.strip() for d in customer_groups.strip().split(",") if d]
Expand Down

0 comments on commit 0eab723

Please sign in to comment.