Skip to content

Dev/nested requestables bug fix

Aaron Bray requested to merge dev/nested_requestables_bug_fix into 2.x

When data requests are used to create a csv file during the execution of a scenario. The data requests are connected to the SEScalar object owned by the system object they are tracking (Such as the Heart Rate scalar on the Cardiovascular system). Some actions may change the values of many scalars on a system (Environmental Conditions, Anesthesia Machine, Inhaler, Nutrition and Meals). The action can accept either a set of scalars inline to replace the ones in Pulse, or it can contain a link to a file on disk to read in and replace the values in Pulse (such as one of the ./environment/*.json files). This fixes a bug where the file I/O was done directly on the Pulse system object, which resulted in creating a new Scalar in the system, and hence creating a dangling pointer by any Data Request connected to one of these scalars. This fix now ensures that when a system is changed via a file in an action, the changes are Merged and the system pointers are preserved.

Merge request reports