Merge pull request #204 from creative-commoners/pulls/3.0/equality-for-all-dataobjects

FIX Don't assume a DataObject's table.
This commit is contained in:
Robbie Averill 2018-02-26 11:00:19 +13:00 committed by GitHub
commit 415fdeb0cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -282,10 +282,6 @@ abstract class SearchIndex extends ViewableData
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);