Fix version editing (#362)

This commit is contained in:
Geometrically
2022-06-02 20:56:12 -07:00
committed by GitHub
parent 02bf5ada89
commit f860f57363
3 changed files with 5 additions and 3 deletions

View File

@@ -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(),