Skip to content

Commit

Permalink
Merge pull request #782 from MTES-MCT/feature/enable-decimal-for-targ…
Browse files Browse the repository at this point in the history
…et-2031-field

fix(decimal): decimal to float
  • Loading branch information
alexisig authored Dec 3, 2024
2 parents 961debe + 0766d06 commit 2509d8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions project/charts/ObjectiveChart.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ def add_series(self):
)
self.series[0]["data"].append({"name": year, "y": val})

self.annual_2020 = self.total_2020 / 10
self.annual_objective_2031 = self.annual_2020 - (self.annual_2020 / 100 * self.project.target_2031)
self.annual_real = self.total_real / 10
self.annual_2020 = self.total_2020 / 10.0
self.annual_objective_2031 = self.annual_2020 - (self.annual_2020 / 100.0 * float(self.project.target_2031))
self.annual_real = self.total_real / 10.0
self.total_2031 = self.total_2020
self.conso_2031 = self.annual_objective_2031 * 10
self.conso_2031 = self.annual_objective_2031 * 10.0

for year in range(2020 + 1, 2031): # noqa: B020
self.total_2031 += self.annual_objective_2031
Expand Down

0 comments on commit 2509d8d

Please sign in to comment.