Skip to content
Snippets Groups Projects
Commit c3c10673 authored by mathias.chouet's avatar mathias.chouet
Browse files

PrebarrageResults: protection against empty result

parent 2f292f0e
No related branches found
No related tags found
No related merge requests found
Pipeline #138418 passed
......@@ -48,7 +48,7 @@ export class PbResultsComponent {
// true if basin results at current iteration have data
public get basinResultsHaveData(): boolean {
return this._pbResults && this._pbResults.basinResultsHaveData;
return this._pbResults && this._pbResults.result && ! this._pbResults.result.hasOnlyErrors && this._pbResults.basinResultsHaveData;
}
// true if wall results are present
......@@ -178,18 +178,22 @@ export class PbResultsComponent {
l.addLog(this._pbResults.result.resultElements[vi].log);
}
// logs des enfants pour l'itération en cours
for (const pbc of pb.children) {
if (pbc?.result?.hasResultElements() && pbc.result.resultElements[vi]?.hasLog()) {
l.addLog(pbc.result.resultElements[vi].log);
if (pb !== undefined) {
for (const pbc of pb.children) {
if (pbc?.result?.hasResultElements() && pbc.result.resultElements[vi]?.hasLog()) {
l.addLog(pbc.result.resultElements[vi].log);
}
}
}
} else {
// B. si aucun paramètre ne varie
this.mergeGlobalLog(this._pbResults.result, l); // faut bien mettre le log global quelque part
// logs des enfants
for (const pbc of pb.children) {
if (pbc?.result?.hasResultElements() && pbc.result.resultElement?.hasLog()) {
l.addLog(pbc.result.resultElement.log);
if (pb !== undefined) {
for (const pbc of pb.children) {
if (pbc?.result?.hasResultElements() && pbc.result.resultElement?.hasLog()) {
l.addLog(pbc.result.resultElement.log);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment