Skip to content

Commit

Permalink
Fix version editing (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Jun 3, 2022
1 parent 02bf5ad commit f860f57
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>", "Redblueflame <[email protected]>", "Aeledfyr <[email protected]>", "Charalampos Fanoulis <[email protected]>", "AppleTheGolden <[email protected]>"]
edition = "2018"
Expand Down
4 changes: 3 additions & 1 deletion src/routes/versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit f860f57

Please sign in to comment.