This commit is contained in:
@@ -72,6 +72,10 @@ class telegramUtils():
|
|||||||
expired_messages_list = []
|
expired_messages_list = []
|
||||||
expired_messages = TelegramData.objects.filter(expiration_date__lte=yesterday)
|
expired_messages = TelegramData.objects.filter(expiration_date__lte=yesterday)
|
||||||
|
|
||||||
|
#leave if the list is empty
|
||||||
|
if expired_messages.len == 0:
|
||||||
|
return 1
|
||||||
|
|
||||||
#create a list with only the message_id
|
#create a list with only the message_id
|
||||||
for expired_message in expired_messages:
|
for expired_message in expired_messages:
|
||||||
expired_messages_list.append(expired_message.message_id)
|
expired_messages_list.append(expired_message.message_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user