🗃️(backend) add name field to identity
We need a name for the user when we display the members in the frontend. This commit adds the name column to the identity model. We sync the Keycloak user with the identity model when the user logs in to fill and udpate the name automatically.
This commit is contained in:
committed by
Samuel Paccoud
parent
8cbfb38cc4
commit
8d7c545d1a
@@ -11,10 +11,14 @@ from django import db
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from faker import Faker
|
||||
|
||||
from core import models
|
||||
|
||||
from demo import defaults
|
||||
|
||||
fake = Faker()
|
||||
|
||||
logger = logging.getLogger("people.commands.demo.create_demo")
|
||||
|
||||
|
||||
@@ -134,6 +138,7 @@ def create_demo(stdout):
|
||||
sub=uuid4(),
|
||||
email=f"identity{i:d}{user_email:s}",
|
||||
is_main=(i == 0),
|
||||
name=fake.name(),
|
||||
)
|
||||
)
|
||||
queue.flush()
|
||||
|
||||
Reference in New Issue
Block a user