Skip to content

Commit

Permalink
Merge pull request #10 from tardinha/master
Browse files Browse the repository at this point in the history
Don't return locations with an empty title
  • Loading branch information
nyeholt authored Nov 22, 2017
2 parents 48c8a76 + b7a15a7 commit 0535039
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/LocationDateTimeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class LocationDateTimeExtension extends DataExtension {
public function updateCMSFields(FieldList $fields) {

$locations = function(){
return EventLocation::get()->map()->toArray();
return EventLocation::get()->where('"EventLocation"."Title" IS NOT NULL')->map()->toArray();
};

$dropdown = DropdownField::create(
Expand Down Expand Up @@ -43,4 +43,4 @@ public function updateCMSFields(FieldList $fields) {
$fields->insertBefore($dropdown, 'StartDate');
}

}
}

0 comments on commit 0535039

Please sign in to comment.