fix(demo_data): set default passwords for staff and superuser in demo data

Ensure default passwords are assigned to demo users for consistent behavior during testing and development.
This commit is contained in:
Egor Pavlovich Gorbunov 2026-02-15 02:17:34 +03:00
parent ad5e8dc335
commit 72a54de707

View file

@ -104,6 +104,8 @@ class Command(BaseCommand):
is_active=True,
is_verified=True,
)
if _:
user.set_password("Staff!Demo888")
if not user.groups.filter(name="E-Commerce Admin").exists():
user.groups.add(Group.objects.get(name="E-Commerce Admin"))
return user
@ -120,6 +122,8 @@ class Command(BaseCommand):
is_active=True,
is_verified=True,
)
if _:
user.set_password("Super!Demo888")
return user
def _load_demo_data(self) -> None: