Fixed bug in status deletion marking

This commit is contained in:
Mikayla Maki 2023-05-10 19:54:02 -07:00
parent fca3bb3b93
commit f5c633e80c
No known key found for this signature in database

View File

@ -2472,38 +2472,6 @@ impl Database {
.exec(&*tx)
.await?;
}
if !repository.removed_worktree_repo_paths.is_empty() {
worktree_repository_statuses::Entity::update_many()
.filter(
worktree_repository_statuses::Column::ProjectId
.eq(project_id)
.and(
worktree_repository_statuses::Column::WorktreeId
.eq(worktree_id),
)
.and(
worktree_repository_statuses::Column::WorkDirectoryId
.eq(repository.work_directory_id),
)
.and(
worktree_repository_statuses::Column::RepoPath.is_in(
repository
.removed_worktree_repo_paths
.iter()
.cloned()
.collect::<Vec<_>>(),
),
),
)
.set(worktree_repository_statuses::ActiveModel {
is_deleted: ActiveValue::Set(true),
scan_id: ActiveValue::Set(update.scan_id as i64),
..Default::default()
})
.exec(&*tx)
.await?;
}
}
}