Skip to content
Snippets Groups Projects
Commit 8bf4b690 authored by Andrii Chyrskyi's avatar Andrii Chyrskyi Committed by Tiago
Browse files

Issue #3291657 by Sutharsan, Ressinel: Also update the 'current ' counter when...

Issue #3291657 by Sutharsan, Ressinel: Also update the 'current ' counter when not processing the entity

The update script social_event_update_10306() does not finish if the field field_event_enable_enrollment is not present or empty.
parent 44030c3a
Branches
Tags
No related merge requests found
......@@ -1981,6 +1981,8 @@ function social_event_update_10306(&$sandbox) {
/** @var \Drupal\node\NodeInterface $event */
foreach ($node_storage->loadMultiple($events_ids) as $event) {
$sandbox['current']++;
if (
!$event->hasField('field_event_enable_enrollment') ||
$event->get('field_event_enable_enrollment')->isEmpty()
......@@ -1995,8 +1997,6 @@ function social_event_update_10306(&$sandbox) {
\Drupal::messenger()
->addMessage($sandbox['current'] . ' users processed.');
$sandbox['current']++;
}
// Try to update the percentage but avoid division by zero.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment