BUG dev/build fails to add extra fields to SiteConfig (fixes #65)

Caused by Translatable->populateSiteConfigDefaults()
triggering before newly created fields are available in the
"SiteConfig" database table.
This commit is contained in:
Ingo Schommer 2012-11-15 13:06:55 +01:00
parent 6413eca05d
commit f925a4102e

View File

@ -1198,6 +1198,7 @@ class Translatable extends DataExtension implements PermissionProvider {
// When the database is being setup singleton('SiteConfig') is called.
if(!DB::getConn()->hasTable($this->owner->class)) return;
if(!DB::getConn()->hasField($this->owner->class, 'Locale')) return;
if(DB::getConn()->isSchemaUpdating()) return;
// Find the best base translation for SiteConfig
Translatable::disable_locale_filter();