Bläddra i källkod

fix wrong filter handle for saved messages (#24891)

Co-authored-by: zhuqingchao <zhuqingchao@xiaomi.com>
tags/1.8.1
ZalterCitty 2 månader sedan
förälder
incheckning
bd482eb8ef
Inget konto är kopplat till bidragsgivarens mejladress
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3
    1
      api/services/message_service.py

+ 3
- 1
api/services/message_service.py Visa fil

@@ -112,7 +112,9 @@ class MessageService:
base_query = base_query.where(Message.conversation_id == conversation.id)

# Check if include_ids is not None and not empty to avoid WHERE false condition
if include_ids is not None and len(include_ids) > 0:
if include_ids is not None:
if len(include_ids) == 0:
return InfiniteScrollPagination(data=[], limit=limit, has_more=False)
base_query = base_query.where(Message.id.in_(include_ids))

if last_id:

Laddar…
Avbryt
Spara