Skip to content

Commit a6e03e4

Browse files
committed
- feat: make username field unique for users
1 parent 24ebf46 commit a6e03e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/user/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def create_superuser(self, username, email, password):
4141

4242

4343
class User(AbstractBaseUser, PermissionsMixin):
44-
username = models.CharField(db_index=True, max_length=255)
44+
username = models.CharField(db_index=True, max_length=255, unique=True)
4545
email = models.EmailField(db_index=True, unique=True)
4646
is_active = models.BooleanField(default=True)
4747
is_staff = models.BooleanField(default=False)

0 commit comments

Comments
 (0)