Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Drop get_random_avatar entirely

Krzysztof Świątekdfab4ca9aa12
diff --git a/saleor/account/utils.py b/saleor/account/utils.py
index 63da03ab8c..c50eca9e94 100644
--- a/saleor/account/utils.py
+++ b/saleor/account/utils.py
@@ -64,7 +64,6 @@ def create_superuser(credentials):
defaults={"is_active": True, "is_staff": True, "is_superuser": True},
)
if created:
- user.avatar = get_random_avatar()
user.set_password(credentials["password"])
user.save()
create_thumbnails(
@@ -76,13 +75,6 @@ def create_superuser(credentials):
return msg
-def get_random_avatar():
- """Return random avatar picked from a pool of static avatars."""
- avatar_name = random.choice(os.listdir(AVATARS_PATH))
- avatar_path = os.path.join(AVATARS_PATH, avatar_name)
- return File(open(avatar_path, "rb"), name=avatar_name)
-
-
def remove_staff_member(staff):
"""Remove staff member account only if it has no orders placed.