Skip to content

Commit 15b8b05

Browse files
committed
Added unique const telegram bot token
1 parent 37dfe36 commit 15b8b05

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
# Generated by Django 1.10.2 on 2016-10-14 01:45
3+
from __future__ import unicode_literals
4+
5+
from django.db import migrations, models
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
('notifications', '0003_auto_20161014_0118'),
12+
]
13+
14+
operations = [
15+
migrations.AlterField(
16+
model_name='telegrambot',
17+
name='token',
18+
field=models.CharField(max_length=100, unique=True),
19+
),
20+
]

notifications/telegram/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class TelegramBot(models.Model):
1515

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

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

0 commit comments

Comments
 (0)