Skip to content

Commit

Permalink
Merge pull request #2729 from gitcoinco/kevin/handle_unique
Browse files Browse the repository at this point in the history
makes profile.handle unique
  • Loading branch information
owocki authored Nov 7, 2018
2 parents a08b36e + 011cc77 commit ddbec19
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions app/dashboard/migrations/0112_auto_20181107_2208.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.1.2 on 2018-11-07 22:08

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('dashboard', '0111_auto_20181101_1922'),
]

operations = [
migrations.AlterField(
model_name='profile',
name='handle',
field=models.CharField(db_index=True, max_length=255, unique=True),
),
]
2 changes: 1 addition & 1 deletion app/dashboard/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ class Profile(SuperModel):

user = models.OneToOneField(User, on_delete=models.SET_NULL, null=True, blank=True)
data = JSONField()
handle = models.CharField(max_length=255, db_index=True)
handle = models.CharField(max_length=255, db_index=True, unique=True)
avatar = models.ForeignKey('avatar.Avatar', on_delete=models.SET_NULL, null=True, blank=True)
last_sync_date = models.DateTimeField(null=True)
email = models.CharField(max_length=255, blank=True, db_index=True)
Expand Down

0 comments on commit ddbec19

Please sign in to comment.