Skip to content

Commit

Permalink
fix: added parentheses for correct query formation for logical OR con…
Browse files Browse the repository at this point in the history
…dition
  • Loading branch information
ljain112 committed Oct 11, 2024
1 parent ab17132 commit c0da8f1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,10 @@ def get_balances_based_on_dimensions(

if get_opening_entries:
query = query.where(
gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date)
| gl_entry.is_opening
== "Yes"
( # noqa: UP034
(gl_entry.posting_date.between(self.get("year_start_date"), self.posting_date))
| (gl_entry.is_opening == "Yes")
)
)
else:
query = query.where(
Expand Down

0 comments on commit c0da8f1

Please sign in to comment.