From 09b3c8df473a4c69812ca4fb55f0651c2fe22a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=20=E6=9F=8F?= Date: Wed, 28 Feb 2024 18:53:40 +0900 Subject: [PATCH] eventaction blacklist --- backend/app/db/crud.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/app/db/crud.py b/backend/app/db/crud.py index 0ffa054..9250a54 100644 --- a/backend/app/db/crud.py +++ b/backend/app/db/crud.py @@ -279,7 +279,8 @@ def get_events(db: Session): return events def get_eventactions(db: Session,eventid: str): - eveactions = db.query(models.Action).join(models.EventAction,models.EventAction.actionid == models.Action.id ).join(models.Event,models.Event.id == models.EventAction.eventid).filter(models.Event.eventid == eventid).all() + #eveactions = db.query(models.Action).join(models.EventAction,models.EventAction.actionid == models.Action.id ).join(models.Event,models.Event.id == models.EventAction.eventid).filter(models.Event.eventid == eventid).all() + eveactions = db.query(models.Action).join(models.EventAction,models.EventAction.actionid != models.Action.id and models.EventAction.eventid == eventid ).join(models.Event,models.Event.id == models.EventAction.eventid).filter(models.Event.eventid == eventid).all() if not eveactions: raise HTTPException(status_code=404, detail="Data not found") return eveactions