mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 14:47:13 -04:00
chore: do not pull object when object ids is empty
This commit is contained in:
parent
fb132cb4b8
commit
3fdd19f7a2
1 changed files with 13 additions and 10 deletions
|
@ -903,18 +903,21 @@ impl DatabaseCollabService for WorkspaceDatabaseCollabServiceImpl {
|
|||
encoded_collab_by_id.insert(k, v);
|
||||
}
|
||||
|
||||
// 2. Fetch remaining collabs from remote
|
||||
let remote_collabs = self
|
||||
.batch_get_encode_collab(object_ids, collab_type)
|
||||
.await?;
|
||||
if !object_ids.is_empty() {
|
||||
// 2. Fetch remaining collabs from remote
|
||||
let remote_collabs = self
|
||||
.batch_get_encode_collab(object_ids, collab_type)
|
||||
.await?;
|
||||
|
||||
trace!(
|
||||
"[Database]: load {} database row from remote",
|
||||
remote_collabs.len()
|
||||
);
|
||||
for (k, v) in remote_collabs {
|
||||
encoded_collab_by_id.insert(k, v);
|
||||
trace!(
|
||||
"[Database]: load {} database row from remote",
|
||||
remote_collabs.len()
|
||||
);
|
||||
for (k, v) in remote_collabs {
|
||||
encoded_collab_by_id.insert(k, v);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(encoded_collab_by_id)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue