style: lint code
This commit is contained in:
parent
19476c593f
commit
5b248cd46b
@ -206,7 +206,8 @@ class MediaRepository:
|
||||
def get_single_media(self, mxid: MediaID) -> File | None:
|
||||
"""Retrieve a single media file by ID."""
|
||||
cur = self._execute(
|
||||
"SELECT media_id, creation_ts, base64hash, file_size_bytes from mediaapi_media_repository WHERE media_id = %s;",
|
||||
"""SELECT media_id, creation_ts, base64hash, file_size_bytes
|
||||
from mediaapi_media_repository WHERE media_id = %s;""",
|
||||
(mxid,),
|
||||
)
|
||||
row = cur.fetchone()
|
||||
@ -222,7 +223,8 @@ class MediaRepository:
|
||||
List of File objects
|
||||
"""
|
||||
cur = self._execute(
|
||||
"SELECT media_id, creation_ts, base64hash, file_size_bytes FROM mediaapi_media_repository WHERE user_id = %s;",
|
||||
"""SELECT media_id, creation_ts, base64hash, file_size_bytes
|
||||
FROM mediaapi_media_repository WHERE user_id = %s;""",
|
||||
(user_id,),
|
||||
)
|
||||
return [File(self, row[0], row[1] // 1000, row[2], row[3]) for row in cur.fetchall()]
|
||||
@ -267,7 +269,7 @@ class MediaRepository:
|
||||
)
|
||||
if (row := cur.fetchone()) and (count := row[0]):
|
||||
logging.error(
|
||||
"You have %d thumbnails in your db that do not refer to media. " "This needs fixing (we don't do that)!",
|
||||
"You have %d thumbnails in your db that do not refer to media. This needs fixing (we don't do that)!",
|
||||
count,
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user