mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
BUGFIX: Reduced reliance of specific data in the system
This commit is contained in:
parent
57a6790f6e
commit
4c9945d0fa
@ -15,7 +15,9 @@ class TestCategory extends DataObject {
|
|||||||
* Returns a dropdown map of all objects of this class
|
* Returns a dropdown map of all objects of this class
|
||||||
*/
|
*/
|
||||||
static function map() {
|
static function map() {
|
||||||
return DataObject::get('TestCategory')->toDropdownMap();
|
$categories = DataObject::get('TestCategory');
|
||||||
|
if($categories) return $categories->toDropdownMap();
|
||||||
|
else return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
function requireDefaultRecords(){
|
function requireDefaultRecords(){
|
||||||
|
Loading…
Reference in New Issue
Block a user