Skip to content

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

Allow ignoring username in creating user account

Mira Szewczyk2c82a47a79bf
diff --git a/saleor/userprofile/models.py b/saleor/userprofile/models.py
index 832130ceca..e0868a26a0 100644
--- a/saleor/userprofile/models.py
+++ b/saleor/userprofile/models.py
@@ -93,7 +93,7 @@ class Address(models.Model):
class UserManager(BaseUserManager):
def create_user(self, email, password=None, is_staff=False,
- is_active=True, **extra_fields):
+ is_active=True, username='', **extra_fields):
'Creates a User with the given username, email and password'
email = UserManager.normalize_email(email)
user = self.model(email=email, is_active=is_active,