Refactor changed are done
This commit is contained in:
@@ -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(
|
||||
|
Reference in New Issue
Block a user