Skip to content

Commit

Permalink
Merge pull request #204 from creative-commoners/pulls/3.0/equality-fo…
Browse files Browse the repository at this point in the history
…r-all-dataobjects

FIX Don't assume a DataObject's table.
  • Loading branch information
robbieaverill authored Feb 25, 2018
2 parents 8dc27d5 + 9e32f2a commit 415fdeb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/Search/Indexes/SearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,6 @@ public function addClass($class, $options = array())
throw new Exception('Can\'t add class to Index after fields have already been added');
}

if (!DataObject::getSchema()->classHasTable($class)) {
throw new \InvalidArgumentException('Can\'t add classes which don\'t have data tables (no $db or $has_one set on the class)');
}

$options = array_merge(array(
'include_children' => true
), $options);
Expand Down

0 comments on commit 415fdeb

Please sign in to comment.