Closed ezio-melotti closed 3 years ago
it can happen that ModelRecord has the data for all steps before StepRecord does. so get_steps will loop through all steps in ModelRecord, and simply fill in all values which depend on StepRecord as empty
solution implemented: don't return any data for step X if both the modelrecord and steprecord are not available.
This fixed the issue, thanks!
Even though now all the steps I receive have all values, the last step of the simulation is never received as described in #82.
I suspect that the database is computing ModelRecord for steps up to and including the step_num passed to step_to, but is computing StepRecord for steps up to but excluding the step_num passed to step_to. I will try to verify that this is the case. If it is, @Pebody will be better able to determine why because I don't know where StepRecord and ModelRecord are being filled.
I noticed that the last step of a batch received from
get_steps
is missing values.Example request:
Response:
As you can see the data in the last step (step_num 10) are all missing except for the
air_storage_1
Another example of a request done just after this that requests step 10 again:
And the response:
Also in this case all the values except for
air_storage_1
are missing.Is the frontend sending a wrong request or is there something wrong on the server side?