diff --git a/PVE/API2/APT.pm b/PVE/API2/APT.pm index dcd87c37..9cf02e45 100644 --- a/PVE/API2/APT.pm +++ b/PVE/API2/APT.pm @@ -757,13 +757,14 @@ __PACKAGE__->register_method({ code => sub { my ($param) = @_; - my $options = { - enabled => $param->{enabled}, - }; + my $options = {}; + + my $enabled = $param->{enabled}; + $options->{enabled} = int($enabled) if defined($enabled); PVE::RS::APT::Repositories::change_repository( $param->{path}, - $param->{index}, + int($param->{index}), $options, $param->{digest} );