mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
adjusting query used in getSubsiteIDForDomain to prevent new DB fields being added to the SQL call if they are not yet added to the DB
This commit is contained in:
parent
10302932a9
commit
24ebd1c9f9
@ -198,7 +198,7 @@ class Subsite extends DataObject
|
||||
}
|
||||
|
||||
$subsiteID = $subsiteIDs[0];
|
||||
} elseif ($default = DataObject::get_one('Subsite', "\"DefaultSite\" = 1")) {
|
||||
} elseif ($default = Subsite::get()->filter('DefaultSite', 1)->setQueriedColumns(array('ID'))->first()) {
|
||||
// Check for a 'default' subsite
|
||||
$subsiteID = $default->ID;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user