mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Extract topic_column_sa().
This commit is contained in:
@@ -35,6 +35,9 @@ def topic_match_sa(topic_name: str) -> Any:
|
||||
topic_cond = func.upper(column("subject")) == func.upper(literal(topic_name))
|
||||
return topic_cond
|
||||
|
||||
def topic_column_sa() -> Any:
|
||||
return column("subject")
|
||||
|
||||
def filter_by_exact_message_topic(query: QuerySet, message: Message) -> QuerySet:
|
||||
topic_name = message.topic_name()
|
||||
return query.filter(subject=topic_name)
|
||||
|
||||
Reference in New Issue
Block a user