Problem/Motivation

There are two Default Consumer entities (id=1 and id=2) that are completely identical — same label, client_id, is_default=true, everything — differing only in their id and uuid.

Steps to reproduce

The duplicate was created when consumers_update_8105 ran as a database update on a site that already had the module installed.

Root cause: The consumers module has two separate code paths that each create a default consumer:
- consumers_install() — runs on first install
- consumers_update_8105() — an update hook that also creates a default consumer without checking if
one already exists

Proposed resolution

Fix consumers_update_8105() to check for existing default_consumer entity (or for id=1) before creating new one or remove the creation of a default consumer completely if not necessary

Comments

alxshell created an issue.