Skip to content

Commit 8894976

Browse files
committed
Apply catch from main API to demo API
1 parent 98e692e commit 8894976

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/murfey/server/demo_api.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -847,17 +847,20 @@ async def request_spa_preprocessing(
847847
feedback_params = params[1]
848848
except sqlalchemy.exc.NoResultFound:
849849
proc_params = None
850-
foil_hole_id = (
851-
db.exec(
852-
select(FoilHole, GridSquare)
853-
.where(FoilHole.name == proc_file.foil_hole_id)
854-
.where(FoilHole.session_id == session_id)
855-
.where(GridSquare.id == FoilHole.grid_square_id)
856-
.where(GridSquare.tag == proc_file.tag)
850+
try:
851+
foil_hole_id = (
852+
db.exec(
853+
select(FoilHole, GridSquare)
854+
.where(FoilHole.name == proc_file.foil_hole_id)
855+
.where(FoilHole.session_id == session_id)
856+
.where(GridSquare.id == FoilHole.grid_square_id)
857+
.where(GridSquare.tag == proc_file.tag)
858+
)
859+
.one()[0]
860+
.id
857861
)
858-
.one()[0]
859-
.id
860-
)
862+
except Exception:
863+
foil_hole_id = None
861864
if proc_params:
862865
session_id = (
863866
db.exec(

0 commit comments

Comments
 (0)