Fix issue in specifying dependencies (#891)

This commit is contained in:
Geometrically
2024-03-18 13:56:06 -07:00
committed by GitHub
parent f8f037196e
commit 730913bec4
5 changed files with 46 additions and 33 deletions

View File

@@ -354,13 +354,10 @@ pub async fn version_edit_helper(
}
if let Some(dependencies) = &new_version.dependencies {
// TODO: Re-add this exclusions when modpack also has separate dependency retrieval that was removed from validators
// if let Some(project) = project_item {
// if project.project_type != "modpack" {
sqlx::query!(
"
DELETE FROM dependencies WHERE dependent_id = $1
",
DELETE FROM dependencies WHERE dependent_id = $1
",
id as database::models::ids::VersionId,
)
.execute(&mut *transaction)
@@ -378,8 +375,6 @@ pub async fn version_edit_helper(
DependencyBuilder::insert_many(builders, version_item.inner.id, &mut transaction)
.await?;
// }
// }
}
if !new_version.fields.is_empty() {