Add readme, screenshots and small fixes

This commit is contained in:
2024-06-22 14:36:54 +04:00
parent c516ba920c
commit 7b2f270913
7 changed files with 45 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ async def edit_audiobook(db: AsyncSession,
audiobook_info: sch.AudiobookCreate):
audiobook = await db.get(mdl.Audiobook, audiobook_id)
for key, value in vars(audiobook_info).items():
if (value and value is not None and getattr(audiobook, key) != value):
if (getattr(audiobook, key) != value):
setattr(audiobook, key, value)
setattr(audiobook, "update_date", strftime("%Y-%m-%d %H:%M:%S"))
await db.commit()

View File

@@ -30,7 +30,7 @@ async def edit_game(db: AsyncSession,
game_info: sch.GameCreate):
game = await db.get(mdl.Game, game_id)
for key, value in vars(game_info).items():
if (value and value is not None and getattr(game, key) != value):
if (getattr(game, key) != value):
setattr(game, key, value)
setattr(game, "update_date", strftime("%Y-%m-%d %H:%M:%S"))
await db.commit()

View File

@@ -30,7 +30,7 @@ async def edit_movie(db: AsyncSession,
movie_info: sch.MovieCreate):
movie = await db.get(mdl.Movie, movie_id)
for key, value in vars(movie_info).items():
if (value and value is not None and getattr(movie, key) != value):
if (getattr(movie, key) != value):
setattr(movie, key, value)
setattr(movie, "update_date", strftime("%Y-%m-%d %H:%M:%S"))
await db.commit()