Commit c101b991 authored by Ruben Young On's avatar Ruben Young On

Simplified the way SQLAlchemy error is imported

parent dcddba36
Pipeline #18662 passed with stages
in 4 minutes
......@@ -15,7 +15,7 @@ from pikepdf import Pdf, PdfImage
from PIL import Image
from wand.image import Image as WandImage
from pylibdmtx import pylibdmtx
from sqlalchemy import exc
from sqlalchemy.exc import InternalError
from .database import db, Scan, Exam, Page, Student, Submission, Solution, ExamWidget
from .datamatrix import decode_raw_datamatrix
......@@ -343,7 +343,7 @@ def process_page(image_data, exam_config, output_dir=None, strict=False):
grade_mcq(sub,, image_array)
except exc.InternalError as e:
except InternalError as e:
if strict:
return False, str(e)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment