Skip to content

Commit 97803f7

Browse files
fix: load model object parents for each object during read_all
1 parent 17022aa commit 97803f7

File tree

1 file changed

+1
-4
lines changed
  • pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core

1 file changed

+1
-4
lines changed

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Core/Model.inc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,10 +1968,7 @@ class Model {
19681968
$parent_id = is_numeric($parent_id) ? (int) $parent_id : $parent_id;
19691969

19701970
# Create a new Model object for this internal object and assign its ID
1971-
$model_object = new $model(id: $internal_id, parent_id: $parent_id, skip_init: true);
1972-
1973-
# Obtain the parent Model object if this Model has a parent Model class assigned
1974-
$model_object->parent_model = $model->parent_model;
1971+
$model_object = new $model(id: $internal_id, parent_id: $parent_id);
19751972

19761973
# Populate the Model object using its current internal values and add it to the array of all Model objects
19771974
$model_object->from_internal_object($internal_object);

0 commit comments

Comments
 (0)