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

@@ -313,7 +313,7 @@ async def video_find(
if q is None and caption is None:
raise VideoSearchQueryEmptyError()
if q is None and caption is not None:
if q is None:
db_query = {
"user": current_user.user,
"album": album,
@@ -324,7 +324,7 @@ async def video_find(
"album": album,
"caption": re.compile(caption),
}
elif q is not None and caption is None:
elif caption is None:
db_query = list(
col_videos.find(
{"user": current_user.user, "album": album, "filename": re.compile(q)},