mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Don't run migration code for permissions if the old field doesn't exist.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64462 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
509f14d6ae
commit
d3f6b8ec9e
@ -320,7 +320,7 @@ class Permission extends DataObject {
|
||||
parent::requireDefaultRecords();
|
||||
|
||||
// Add default content if blank
|
||||
if(!DB::query("SELECT ID FROM Permission")->value()) {
|
||||
if(!DB::query("SELECT ID FROM Permission")->value() && array_key_exists('CanCMSAdmin', DB::fieldList('Group'))) {
|
||||
$admins = DB::query("SELECT ID FROM `Group` WHERE CanCMSAdmin = 1")
|
||||
->column();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user