mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
zilencer: Only fetch the column we actually care about.
This commit is contained in:
committed by
Tim Abbott
parent
f95c8b894a
commit
d228c502e9
@@ -519,7 +519,7 @@ def remote_server_post_analytics(
|
|||||||
|
|
||||||
|
|
||||||
def get_last_id_from_server(server: RemoteZulipServer, model: Any) -> int:
|
def get_last_id_from_server(server: RemoteZulipServer, model: Any) -> int:
|
||||||
last_count = model.objects.filter(server=server).order_by("remote_id").last()
|
last_count = model.objects.filter(server=server).order_by("remote_id").only("remote_id").last()
|
||||||
if last_count is not None:
|
if last_count is not None:
|
||||||
return last_count.remote_id
|
return last_count.remote_id
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user