FS updates and corrections

This commit is contained in:
Remy Moll
2022-06-15 11:14:08 +02:00
parent 54760abee4
commit 87d65fc988
14 changed files with 91 additions and 56 deletions

View File

@@ -207,7 +207,11 @@ class Thread(ChatBaseModel):
@property
def initiator_message(self):
return self.messages[0] # TODO check if this needs sorting
try:
return self.messages[0] # TODO check if this needs sorting
except IndexError:
logger.warning(f"Thread {self} is empty. How can that be?")
return None
@property
def message_count(self):
@@ -222,6 +226,9 @@ class Thread(ChatBaseModel):
@property
def is_fully_processed(self) -> bool:
init_message = self.initiator_message
if init_message is None:
return False
if init_message.is_processed_override:
return True
# this override is set for instance, when no url was sent at all. Then set this thread to be ignored