Fix version editing (#362)

This commit is contained in:
Geometrically authored and GitHub committed 2022-06-02 20:56:12 -07:00
1 parent 02bf5ada89
commit f860f57363
3 files changed
+5 -3

No files matched your search

+3 -1
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(),