Skip to content

Commit 4bf2904

Browse files
chore: remove dry_run field from SystemUpdate
Collision with the new dry_run control parameter which does the same thing.
1 parent 122896a commit 4bf2904

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/SystemUpdate.inc

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,11 @@ use RESTAPI\Fields\BooleanField;
1212
* Defines a Model that performs a pfSense update operation.
1313
*/
1414
class SystemUpdate extends Model {
15-
public BooleanField $dry_run;
16-
1715
public function __construct(mixed $id = null, mixed $parent_id = null, mixed $data = [], ...$options) {
1816
# Set model attributes
1917
$this->many = false;
2018
$this->always_apply = true;
2119

22-
# Set model fields
23-
$this->dry_run = new BooleanField(
24-
default: false,
25-
write_only: true,
26-
verbose_name: 'Dry Run',
27-
help_text: 'Run the pfSense update process in dry-run mode (-n) without applying changes.',
28-
);
29-
3020
parent::__construct($id, $parent_id, $data, ...$options);
3121
}
3222

@@ -41,6 +31,6 @@ class SystemUpdate extends Model {
4131
* Spawns a dispatcher process that performs package update + pfSense upgrade.
4232
*/
4333
public function apply(): void {
44-
(new SystemUpdateDispatcher(async: $this->async))->spawn_process(dry_run: $this->dry_run->value);
34+
(new SystemUpdateDispatcher(async: $this->async))->spawn_process(dry_run: $this->dry_run);
4535
}
4636
}

0 commit comments

Comments
 (0)