chore: do not pull object when object ids is empty

This commit is contained in:
nathan 2024-12-09 15:17:11 +08:00
parent fb132cb4b8
commit 3fdd19f7a2

View file

@ -903,6 +903,7 @@ impl DatabaseCollabService for WorkspaceDatabaseCollabServiceImpl {
encoded_collab_by_id.insert(k, v);
}
if !object_ids.is_empty() {
// 2. Fetch remaining collabs from remote
let remote_collabs = self
.batch_get_encode_collab(object_ids, collab_type)
@ -915,6 +916,8 @@ impl DatabaseCollabService for WorkspaceDatabaseCollabServiceImpl {
for (k, v) in remote_collabs {
encoded_collab_by_id.insert(k, v);
}
}
Ok(encoded_collab_by_id)
}