From 9863662e34d7ffb2db4446d190d1be8478160cd9 Mon Sep 17 00:00:00 2001 From: pierre geeraert Date: Tue, 30 Jun 2026 20:17:51 +0100 Subject: [PATCH] 'QuerySet' object has no attribute 'len' --- django_code/apps/telegram_communication/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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