diff --git a/webapp/src/Controller/Jury/ConfigController.php b/webapp/src/Controller/Jury/ConfigController.php index 62000942df..a81fcdc531 100644 --- a/webapp/src/Controller/Jury/ConfigController.php +++ b/webapp/src/Controller/Jury/ConfigController.php @@ -66,6 +66,16 @@ public function indexAction(EventLogService $eventLogService, Request $request): } } $before = $this->config->all(); + // In case we clear a value it would not be sent and we keep the old value, this is a mistake + foreach ($before as $key => $value) { + if (!isset($data[$key])) { + if (is_array($value)) { + $data[$key] = []; + } else { + $data[$key] = null; + } + } + } $errors = $this->config->saveChanges($data, $eventLogService, $this->dj, options: $options); $after = $this->config->all();