File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -85,10 +85,13 @@ class Package extends Model {
8585 /**
8686 * Installs the package assigned to the `name` field.
8787 */
88- public function _create () {
88+ public function _create (): void {
8989 # Install the package
9090 pkg_install ($ this ->name ->value );
9191
92+ # Clear the object cache to ensure we get fresh data
93+ $ this ->clear_object_cache ();
94+
9295 # Locate this package's current ID and load info about the package installed
9396 $ this ->id = $ this ->query (name: $ this ->name ->value )->first ()->id ;
9497 $ this ->from_internal ();
@@ -97,7 +100,7 @@ class Package extends Model {
97100 /**
98101 * Deletes the package assigned to the `name` field.
99102 */
100- public function _delete () {
103+ public function _delete (): void {
101104 pkg_delete ($ this ->name ->value );
102105 }
103106}
You can’t perform that action at this time.
0 commit comments