refs #799 adds apparmor exception to write in kea conf and delete hash in controller
testing/og-dhcp-API/pipeline/head There was a failure building this commit Details

testing
Luis Gerardo Romero Garcia 2024-10-01 15:47:12 +02:00 committed by Nicolas Arenas
parent 4266bdffb4
commit c136f004e9
1 changed files with 4 additions and 0 deletions

View File

@ -286,6 +286,10 @@ class DhcpController
return new JsonResponse(['error' => $responseError], 400);
} else {
$response[0]['arguments']['Dhcp4']['subnet4'][] = $newSubnet;
// Eliminar el campo 'hash' si existe
if (isset($response[0]['arguments']['hash'])) {
unset($response[0]['arguments']['hash']);
}
$array_encoded = json_encode($response[0]['arguments']);
$configurationParsed = str_replace('\\', '', $array_encoded);
$configuration = json_decode($configurationParsed);