fix: corrupted logic of model transformer

This commit is contained in:
Björn Fromme
2026-04-16 16:40:38 +02:00
parent 0fcecc9c58
commit ca5a604a3e
2 changed files with 10 additions and 11 deletions
@@ -59,12 +59,8 @@ class RoomSelectionToIdTransformer implements DataTransformerInterface
return null;
}
if (is_int($value)) {
return $value;
}
if (is_string($value) && ctype_digit($value)) {
return (int) $value;
if ($value instanceof RoomSelectionDto) {
return $value->id;
}
throw new TransformationFailedException(sprintf(