Refactor changed are done

This commit is contained in:
2023-06-23 12:17:01 +02:00
parent b003712358
commit 2a7870620c
9 changed files with 36 additions and 39 deletions

View File

@@ -108,12 +108,12 @@ async def album_patch(
except InvalidId:
raise AlbumNotFoundError(id)
if title is not None:
if 2 > len(title) > 40:
raise AlbumIncorrectError("title", "must be >2 and <40 characters.")
else:
if title is None:
title = album["title"]
elif 2 > len(title) > 40:
raise AlbumIncorrectError("title", "must be >2 and <40 characters.")
if name is not None:
if re.search(re.compile("^[a-z,0-9,_]*$"), name) is False:
raise AlbumIncorrectError(