Skip to content

Commit

Permalink
FIX #579 BUG Ambiguous column RecordID when doing batch actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ed Linklater committed Jul 26, 2018
1 parent 8e5905f commit fea9ef7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions code/CMSBatchActionHandler.php
Expand Up @@ -327,9 +327,7 @@ protected function getPages($ids)
if ($recordClass::has_extension(Versioned::class)) {
// Workaround for get_including_deleted not supporting byIDs filter very well
// Ensure we select both stage / live records
$pages = Versioned::get_including_deleted($recordClass, array(
'"RecordID" IN ('.DB::placeholders($ids).')' => $ids
));
$pages = Versioned::get_including_deleted($recordClass)->byIDs($ids);
} else {
$pages = DataObject::get($recordClass)->byIDs($ids);
}
Expand Down

0 comments on commit fea9ef7

Please sign in to comment.