Skip to main content
Sign in
Snippets Groups Projects

Logements modif

3 files
+ 178
22
Compare changes
  • Side-by-side
  • Inline

Files

@@ -269,15 +269,15 @@ class GetLogement:
@@ -269,15 +269,15 @@ class GetLogement:
self.data.logements.dpe_communes = [
self.data.logements.dpe_communes = [
{
{
"classe_consommation_energie": row[0],
"classe_consommation_energie": row[0],
"2013": utilitaires.to_int(row[1]),
"2013": utilitaires.to_int(0 if row[1] is None else row[1]),
"2014": utilitaires.to_int(row[2]),
"2014": utilitaires.to_int(0 if row[2] is None else row[2]),
"2015": utilitaires.to_int(row[3]),
"2015": utilitaires.to_int(0 if row[3] is None else row[3]),
"2016": utilitaires.to_int(row[4]),
"2016": utilitaires.to_int(0 if row[4] is None else row[4]),
"2017": utilitaires.to_int(row[5]),
"2017": utilitaires.to_int(0 if row[5] is None else row[5]),
"2018": utilitaires.to_int(row[6]),
"2018": utilitaires.to_int(0 if row[6] is None else row[6]),
"2019": utilitaires.to_int(row[7]),
"2019": utilitaires.to_int(0 if row[7] is None else row[7]),
"2020": utilitaires.to_int(row[8]),
"2020": utilitaires.to_int(0 if row[8] is None else row[8]),
"2021": utilitaires.to_int(row[9]),
"2021": utilitaires.to_int(0 if row[9] is None else row[9]),
}
}
for row in self.db.fetchall()
for row in self.db.fetchall()
]
]
@@ -304,9 +304,9 @@ class GetLogement:
@@ -304,9 +304,9 @@ class GetLogement:
self.data.logements.dpe_post_2021 = [
self.data.logements.dpe_post_2021 = [
{
{
"classe_consommation_energie": row[0],
"classe_consommation_energie": row[0],
"2021": utilitaires.to_int(row[1]),
"2021": utilitaires.to_int(0 if row[1] is None else row[1]),
"2022": utilitaires.to_int(row[2]),
"2022": utilitaires.to_int(0 if row[2] is None else row[2]),
"2023": utilitaires.to_int(row[3]),
"2023": utilitaires.to_int(0 if row[3] is None else row[3]),
}
}
for row in self.db.fetchall()
for row in self.db.fetchall()
]
]
Loading