Skip to content

Commit

Permalink
fix: remove conflicting logic from openvpn client disable field #451
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhendrickson13 committed Apr 11, 2024
1 parent 385ba15 commit e106e09
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1115,9 +1115,9 @@ class APIServicesOpenVPNServerUpdate extends APIModel {

private function __validate_disabled() {
# Check for our optional `disabled` payload value
if (($this->initial_data["disable"] === true) and (empty($this->validated_data["disable"]))) {
if ($this->initial_data["disable"] === true) {
$this->validated_data["disable"] = "";
} elseif (($this->initial_data["disable"] === false) and (!empty($this->validated_data["disable"]))) {
} elseif ($this->initial_data["disable"] === false) {
unset($this->validated_data["disable"]);
}
}
Expand Down

0 comments on commit e106e09

Please sign in to comment.