Update KlimaFaktoren.ts

This commit is contained in:
Moritz Utcke
2024-02-28 23:10:41 +07:00
committed by GitHub
parent f955aa24fb
commit 4215e92236

View File

@@ -11,11 +11,13 @@ export async function auditKlimaFaktoren(ausweis: VerbrauchsausweisWohnenClient,
}
if (ausweis.startdatum && gebaeude.plz && ausweis.verbrauch_1) {
const response = await getKlimafaktoren(ausweis.startdatum, gebaeude.plz);
if (!response) {
return true;
}
try {
const response = await getKlimafaktoren(ausweis.startdatum, gebaeude.plz);
return true; // Alle Klimfaktoren konnten abgefragt werden.
} catch (e) {
return true;
}
}
return false;
}
}