From 186a12a4ea4bc3945c90a524b110175b9fd5ae31 Mon Sep 17 00:00:00 2001 From: Kalle Edstroem Date: Mon, 20 Nov 2023 12:36:15 +0000 Subject: [PATCH] Added handling of no cases provided for ResultRequest --- Lusas_Adapter/CRUD/Read/Results/ReadResults.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lusas_Adapter/CRUD/Read/Results/ReadResults.cs b/Lusas_Adapter/CRUD/Read/Results/ReadResults.cs index ddcf1f0d..402af03a 100644 --- a/Lusas_Adapter/CRUD/Read/Results/ReadResults.cs +++ b/Lusas_Adapter/CRUD/Read/Results/ReadResults.cs @@ -32,6 +32,7 @@ using System.Linq; using BH.Engine.Adapters.Lusas; using BH.oM.Adapters.Lusas; +using Lusas.LPI; namespace BH.Adapter.Lusas { @@ -179,6 +180,14 @@ private List GetLoadcaseIDs(IResultRequest request) } } + else if (cases.Count == 0) + { + for (int i = 1; i <= d_LusasData.getLargestLoadsetID(); i++) + { + caseNums.Add(i); + } + } + else { List idsOut = new List();