Skip to content

Commit

Permalink
Removed an unnecessary check in code which always evaluates to true (f…
Browse files Browse the repository at this point in the history
…rappe#33710)

fix: removed an unnecessary check which always evaluates to true
  • Loading branch information
mergify[bot] authored and SaiFi0102 committed Feb 22, 2023
1 parent 504c827 commit 2dfc123
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,15 +378,14 @@ def generate_report_data(self):
ret += [{}]

# add total row
if ret is not []:
if self.filters.type == "Revenue":
total_row = frappe._dict({"name": "Total Deferred Income"})
elif self.filters.type == "Expense":
total_row = frappe._dict({"name": "Total Deferred Expense"})
if self.filters.type == "Revenue":
total_row = frappe._dict({"name": "Total Deferred Income"})
elif self.filters.type == "Expense":
total_row = frappe._dict({"name": "Total Deferred Expense"})

for idx, period in enumerate(self.period_list, 0):
total_row[period.key] = self.period_total[idx].total
ret.append(total_row)
for idx, period in enumerate(self.period_list, 0):
total_row[period.key] = self.period_total[idx].total
ret.append(total_row)

return ret

Expand Down

0 comments on commit 2dfc123

Please sign in to comment.