Skip to content
Snippets Groups Projects
Commit bfadffce authored by Pieter Frenssen's avatar Pieter Frenssen
Browse files

Issue #3478802 by pfrenssen: Capacity not updated when a new registrant is created

parent 3d798c14
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
namespace Drupal\recurring_events_registration\Entity;
use Drupal\Core\Cache\Cache;
use Drupal\Core\Entity\EditorialContentEntityBase;
use Drupal\Core\Entity\EntityChangedTrait;
use Drupal\Core\Entity\EntityStorageInterface;
......@@ -393,4 +394,18 @@ class Registrant extends EditorialContentEntityBase implements RegistrantInterfa
);
}
/**
* {@inheritdoc}
*/
protected function invalidateTagsOnSave($update) {
parent::invalidateTagsOnSave($update);
// The parent method only invalidates list cache tags when a new registrant
// is created. We also need to invalidate the cache tags for the event
// instance and series so that the counters are updated.
if (!$update) {
Cache::invalidateTags($this->getCacheTagsToInvalidate());
}
}
}
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