add migrations
This commit is contained in:
parent
cc90c90e80
commit
867a3b84dc
@ -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),
|
||||
),
|
||||
]
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user