forked from ScoDoc/DocScoDoc
exception -handling
This commit is contained in:
parent
dbab59039c
commit
c1c9f22a31
@ -39,6 +39,7 @@ from app.scodoc.gen_tables import GenTable
|
||||
from app.scodoc import html_sco_header
|
||||
from app.scodoc import sco_etud
|
||||
from app.scodoc import sco_groups
|
||||
from app.scodoc.sco_exceptions import ScoException
|
||||
from app.scodoc.sco_permissions import Permission
|
||||
from app.scodoc import sco_preferences
|
||||
|
||||
@ -221,7 +222,10 @@ def search_etuds_infos(expnom=None, code_nip=None):
|
||||
cnx = ndb.GetDBConnexion()
|
||||
if expnom and not may_be_nip:
|
||||
expnom = expnom.upper() # les noms dans la BD sont en uppercase
|
||||
etuds = sco_etud.etudident_list(cnx, args={"nom": expnom}, test="~")
|
||||
try:
|
||||
etuds = sco_etud.etudident_list(cnx, args={"nom": expnom}, test="~")
|
||||
except ScoException:
|
||||
etuds = []
|
||||
else:
|
||||
code_nip = code_nip or expnom
|
||||
if code_nip:
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- mode: python -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
SCOVERSION = "9.1.65"
|
||||
SCOVERSION = "9.1.66"
|
||||
|
||||
SCONAME = "ScoDoc"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user