Commit 94a10309 authored by Jonathan Shaw's avatar Jonathan Shaw Committed by Adam Shepherd
Browse files

Issue #3266989 by jonathanshaw, Berdir: Subscriber does not declare uuid entity key

parent 8186fc0e
Loading
Loading
Loading
Loading
+10 −0
Changes for simplenews.install: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -385,3 +385,13 @@ function simplenews_update_830007() {
  $config->save();
}

/**
 * Add a 'uuid' entity key to subscriber.
 */
function simplenews_update_830008() {
  $entity_type = \Drupal::entityDefinitionUpdateManager()->getEntityType('simplenews_subscriber');
  $entity_keys = $entity_type->getKeys();
  $entity_keys['uuid'] = 'uuid';
  $entity_type->set('entity_keys', $entity_keys);
  \Drupal::entityDefinitionUpdateManager()->updateEntityType($entity_type);
}
+1 −0
Changes for src/Entity/Subscriber.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ use Drupal\user\UserInterface;
 *   base_table = "simplenews_subscriber",
 *   entity_keys = {
 *     "id" = "id",
 *     "uuid" = "uuid",
 *     "label" = "mail"
 *   },
 *   field_ui_base_route = "simplenews.settings_subscriber",