Excluded deleted entries when initially sending worktrees to guests

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-12-22 11:18:10 -08:00
parent 738e161bc6
commit 42e74e7eef

View file

@ -2390,7 +2390,11 @@ impl Database {
// Populate worktree entries.
{
let mut db_entries = worktree_entry::Entity::find()
.filter(worktree_entry::Column::ProjectId.eq(project_id))
.filter(
Condition::all()
.add(worktree_entry::Column::ProjectId.eq(project_id))
.add(worktree_entry::Column::IsDeleted.eq(false)),
)
.stream(&*tx)
.await?;
while let Some(db_entry) = db_entries.next().await {