Skip to content

Commit

Permalink
Set api_key to be unique
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr committed Jul 8, 2015
1 parent e183aff commit 6860dde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion redash/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class User(ModelTimestampsMixin, BaseModel, UserMixin, PermissionsCheckMixin):
email = peewee.CharField(max_length=320, index=True, unique=True)
password_hash = peewee.CharField(max_length=128, null=True)
groups = ArrayField(peewee.CharField, default=DEFAULT_GROUPS)
api_key = peewee.CharField(max_length=40)
api_key = peewee.CharField(max_length=40, unique=True)

class Meta:
db_table = 'users'
Expand Down

0 comments on commit 6860dde

Please sign in to comment.