Skip to content
Snippets Groups Projects
Commit 3371f571 authored by Anne Bonham's avatar Anne Bonham Committed by mandclu
Browse files

Issue #3298195: smart_date:migrate doesn't work for media entities

parent 8c7ad6d1
No related branches found
Tags 7.x-1.1
No related merge requests found
......@@ -52,9 +52,15 @@ class SmartDateDrushCommands extends DrushCommands {
}
$this->output()->writeln('Starting date migration.');
$entity_type = 'type';
if ($entity === 'media') {
$entity_type = 'bundle';
}
// Get all events.
$events = \Drupal::entityTypeManager()->getStorage($entity)
->loadByProperties(['type' => $bundle]);
->loadByProperties([$entity_type => $bundle]);
$utc = new \DateTimeZone('UTC');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment