diff --git a/django_code/apps/telegram_communication/utils.py b/django_code/apps/telegram_communication/utils.py index a9c9843..ac99729 100644 --- a/django_code/apps/telegram_communication/utils.py +++ b/django_code/apps/telegram_communication/utils.py @@ -73,7 +73,7 @@ class telegramUtils(): expired_messages = TelegramData.objects.filter(expiration_date__lte=yesterday) #leave if the list is empty - if expired_messages.len == 0: + if len(expired_messages) == 0: return 1 #create a list with only the message_id