Skip to content

Commit

Permalink
Added unique const telegram bot token
Browse files Browse the repository at this point in the history
  • Loading branch information
seba3c committed Oct 14, 2016
1 parent 37dfe36 commit 15b8b05
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions notifications/migrations/0004_auto_20161014_0145.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-14 01:45
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('notifications', '0003_auto_20161014_0118'),
]

operations = [
migrations.AlterField(
model_name='telegrambot',
name='token',
field=models.CharField(max_length=100, unique=True),
),
]
2 changes: 1 addition & 1 deletion notifications/telegram/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TelegramBot(models.Model):

name = models.CharField(max_length=25, null=False, primary_key=True)
# allows more than one telegram bot implementation with the same token
token = models.CharField(max_length=100, null=False)
token = models.CharField(max_length=100, null=False, unique=True)

module_name = models.CharField(max_length=25, null=True)

Expand Down

0 comments on commit 15b8b05

Please sign in to comment.