forked from retoor/devplacepy
chore: document project-wide soft delete pattern and add deleted_by column to all tables
This commit is contained in:
@@ -101,7 +101,9 @@ async def news_detail_page(request: Request, news_slug: str):
|
||||
|
||||
image_url = ""
|
||||
if "news_images" in db.tables:
|
||||
img = get_table("news_images").find_one(news_uid=article["uid"])
|
||||
img = get_table("news_images").find_one(
|
||||
news_uid=article["uid"], deleted_at=None
|
||||
)
|
||||
if img:
|
||||
image_url = img["url"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user