add migrations

This commit is contained in:
bakatrouble 2022-02-23 13:13:42 +03:00
parent cc90c90e80
commit 867a3b84dc
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 3.2 on 2022-02-22 22:54
# Generated by Django 3.2 on 2022-02-23 10:13
from django.db import migrations, models
@ -13,6 +13,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='queueditem',
name='message_id',
field=models.PositiveBigIntegerField(db_index=True, default=None),
field=models.PositiveBigIntegerField(blank=True, db_index=True, default=None, null=True),
),
]

View File

@ -141,7 +141,7 @@ class QueuedItem(models.Model):
config = models.ForeignKey(ChannelHelperBotModuleConfig, on_delete=models.CASCADE, related_name='queued_items')
type = models.CharField(max_length=12)
args = models.TextField()
message_id = models.PositiveBigIntegerField(default=None, db_index=True)
message_id = models.PositiveBigIntegerField(default=None, db_index=True, null=True, blank=True)
def send(self, bot: Bot):
getattr(bot, 'send_' + self.type)(self.config.chat_id, *json.loads(self.args))