diff --git a/app/Models/Foundation/Summit/Attendees/SummitAttendee.php b/app/Models/Foundation/Summit/Attendees/SummitAttendee.php index 4c848434..e436ff5c 100644 --- a/app/Models/Foundation/Summit/Attendees/SummitAttendee.php +++ b/app/Models/Foundation/Summit/Attendees/SummitAttendee.php @@ -213,8 +213,7 @@ class SummitAttendee extends SilverstripeBaseModel $sql = <<prepareRawSQL($sql); @@ -236,7 +235,7 @@ SQL; $query = $this->createQuery("SELECT s from models\summit\SummitAttendeeSchedule s JOIN s.attendee a JOIN s.event e - WHERE a.id = :attendee_id and e.published = 1 and e.id = :event_id + WHERE a.id = :attendee_id and e.id = :event_id "); return $query ->setParameter('attendee_id', $this->getIdentifier()) @@ -246,6 +245,10 @@ SQL; catch(NoResultException $ex1){ return null; } + catch(NonUniqueResultException $ex2){ + // should never happen + return null; + } } /**