Commit 727a943c authored by nicola85's avatar nicola85

Fix error on SalepriceResolver when there isn’t a booking entity

parent 954ca572
......@@ -41,8 +41,7 @@ class SalepriceResolver implements PriceResolverInterface {
$bee_settings = \Drupal::config('node.type.' . $node->bundle())->get('bee');
$booking = $order_item->get('field_booking')->entity;
if ($booking = $order_item->get('field_booking')->entity) {
$start_date = new \DateTime($booking->get('booking_start_date')->value);
$end_date = new \DateTime($booking->get('booking_end_date')->value);
......@@ -84,5 +83,6 @@ class SalepriceResolver implements PriceResolverInterface {
}
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment