fix: allow hotel-less travel data
addresses #869ckkwh7
This commit is contained in:
1 parent
502281e219
commit
ccfafc5da4
4 files changed
+87
-5
No files matched your search
@@ -91,6 +91,12 @@ class HotelLoader extends AbstractLoader
|
||||
public function patchHotelDetails(Travel $travel): void
|
||||
{
|
||||
$hotelId = $travel->hotelId;
|
||||
if (null === $hotelId) {
|
||||
$travel->hotel = null;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$hotel = $this->loadById($hotelId);
|
||||
$travel->hotel = $hotel;
|
||||
|
||||
Reference in new issue
Block a user