FIX Use base class (not remapping target class) when looking up whether object is versioned

This commit is contained in:
Robbie Averill 2018-08-28 14:15:02 +12:00
parent 953153500d
commit d651d0fbfc

View File

@ -407,7 +407,7 @@ class DatabaseAdmin extends Controller
// Remap versioned table class name values as well // Remap versioned table class name values as well
/** @var Versioned|DataObject $class */ /** @var Versioned|DataObject $class */
$class = DataObject::singleton($newClassName); $class = DataObject::singleton($dataClass);
if ($class->hasExtension(Versioned::class)) { if ($class->hasExtension(Versioned::class)) {
if ($class->hasStages()) { if ($class->hasStages()) {
$updateQueries[] = sprintf($updateQuery, '_Live'); $updateQueries[] = sprintf($updateQuery, '_Live');