From 63d9e101721e41c4afe7fc7fb7b3012357dc7ec2 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Tue, 5 Oct 2010 17:38:24 +0200 Subject: [PATCH] set root message as NotLoaded if there are no messages and it's not a full request --- weboob/backends/aum/backend.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/weboob/backends/aum/backend.py b/weboob/backends/aum/backend.py index c56f006c..f04663a7 100644 --- a/weboob/backends/aum/backend.py +++ b/weboob/backends/aum/backend.py @@ -21,6 +21,7 @@ from datetime import datetime from dateutil import tz from logging import warning, debug +from weboob.capabilities.base import NotLoaded from weboob.capabilities.chat import ICapChat from weboob.capabilities.messages import ICapMessages, ICapMessagesPost, Message, Thread from weboob.capabilities.dating import ICapDating, StatusField @@ -161,10 +162,14 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh child = msg - if full: + if full and msg: # If we have get all the messages, replace NotLoaded with None as # parent. msg.parent = None + if not full and not msg: + # Perhaps there are hidden messages + msg = NotLoaded + thread.root = msg return thread