Skip to content

Commit

Permalink
fix: get_dimension with_cost_center_and_project=false is not working (#…
Browse files Browse the repository at this point in the history
…35974)

fix: get_dimension with_cost_center_and_project=false is not working (#35974)

* fix: get_dimension with_cost_center_and_project=false is not working.

with_cost_center_and_project is no python str, and it always evaluated as True, despite JS call it with false

* chore: Linting Issues

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit 3b884ef)

Co-authored-by: Kitti U. @ Ecosoft <kittiu@gmail.com>
  • Loading branch information
mergify[bot] and kittiu committed Jul 14, 2023
1 parent b86571d commit 42c93a1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ def get_dimensions(with_cost_center_and_project=False):
as_dict=1,
)

if isinstance(with_cost_center_and_project, str):
if with_cost_center_and_project.lower().strip() == "true":
with_cost_center_and_project = True
else:
with_cost_center_and_project = False

if with_cost_center_and_project:
dimension_filters.extend(
[
Expand Down

0 comments on commit 42c93a1

Please sign in to comment.