mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX Ensure that a BlogHolder record doesn't exist properly by checking if the record has an ID
This commit is contained in:
parent
098ae9b32c
commit
2e58553940
@ -85,7 +85,8 @@ class BlogHolder extends BlogTree implements PermissionProvider {
|
||||
function requireDefaultRecords() {
|
||||
parent::requireDefaultRecords();
|
||||
|
||||
if(!DataObject::get_one('BlogHolder')) {
|
||||
$blogHolder = DataObject::get_one('BlogHolder');
|
||||
if(!($blogHolder && $blogHolder->exists())) {
|
||||
$blogholder = new BlogHolder();
|
||||
$blogholder->Title = "Blog";
|
||||
$blogholder->URLSegment = "blog";
|
||||
|
Loading…
Reference in New Issue
Block a user