fix: corrupted logic of model transformer
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user