You've already forked AstralRinth
forked from didirus/AstralRinth
Fix version editing (#362)
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1399,7 +1399,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "labrinth"
|
||||
version = "2.3.1"
|
||||
version = "2.4.1"
|
||||
dependencies = [
|
||||
"actix",
|
||||
"actix-cors",
|
||||
|
||||
@@ -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 <jai.a@tuta.io>", "Redblueflame <contact@redblueflame.com>", "Aeledfyr <aeledfyr@gmail.com>", "Charalampos Fanoulis <yo@fanoulis.dev>", "AppleTheGolden <scotsbox@protonmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user