diff --git a/Cargo.lock b/Cargo.lock index f8719adba..16f8f2661 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1399,7 +1399,7 @@ dependencies = [ [[package]] name = "labrinth" -version = "2.3.1" +version = "2.4.1" dependencies = [ "actix", "actix-cors", diff --git a/Cargo.toml b/Cargo.toml index 2a23b85e5..518c08705 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "labrinth" -version = "2.3.1" +version = "2.4.1" #Team members, please add your emails and usernames authors = ["geometrically ", "Redblueflame ", "Aeledfyr ", "Charalampos Fanoulis ", "AppleTheGolden "] edition = "2018" diff --git a/src/routes/versions.rs b/src/routes/versions.rs index 626886d1e..5515947f2 100644 --- a/src/routes/versions.rs +++ b/src/routes/versions.rs @@ -258,7 +258,9 @@ pub async fn version_edit( .fetch_one(&mut *transaction) .await?; - if results.exists.unwrap_or(true) { + if results.exists.unwrap_or(true) + && &version_item.version_number != number + { return Err(ApiError::InvalidInput( "A version with that version_number already exists" .to_string(),