mirror of https://github.com/zulip/zulip.git
narrow: Directly access recipient_id from Stream object.
We previously used to access the whole recipient object unnecessarily in NarrowBuilder.by_stream code when only ID was needed.
This commit is contained in:
parent
91a58d026b
commit
537ecbab45
|
@ -435,9 +435,9 @@ class NarrowBuilder:
|
|||
cond = column("recipient_id", Integer).in_(recipient_ids)
|
||||
return query.where(maybe_negate(cond))
|
||||
|
||||
recipient = stream.recipient
|
||||
assert recipient is not None
|
||||
cond = column("recipient_id", Integer) == recipient.id
|
||||
recipient_id = stream.recipient_id
|
||||
assert recipient_id is not None
|
||||
cond = column("recipient_id", Integer) == recipient_id
|
||||
return query.where(maybe_negate(cond))
|
||||
|
||||
def by_streams(self, query: Select, operand: str, maybe_negate: ConditionTransform) -> Select:
|
||||
|
|
Loading…
Reference in New Issue