forked from ScoDoc/ScoDoc
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 html_sco_header
|
||||||
from app.scodoc import sco_etud
|
from app.scodoc import sco_etud
|
||||||
from app.scodoc import sco_groups
|
from app.scodoc import sco_groups
|
||||||
|
from app.scodoc.sco_exceptions import ScoException
|
||||||
from app.scodoc.sco_permissions import Permission
|
from app.scodoc.sco_permissions import Permission
|
||||||
from app.scodoc import sco_preferences
|
from app.scodoc import sco_preferences
|
||||||
|
|
||||||
@ -221,7 +222,10 @@ def search_etuds_infos(expnom=None, code_nip=None):
|
|||||||
cnx = ndb.GetDBConnexion()
|
cnx = ndb.GetDBConnexion()
|
||||||
if expnom and not may_be_nip:
|
if expnom and not may_be_nip:
|
||||||
expnom = expnom.upper() # les noms dans la BD sont en uppercase
|
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:
|
else:
|
||||||
code_nip = code_nip or expnom
|
code_nip = code_nip or expnom
|
||||||
if code_nip:
|
if code_nip:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
SCOVERSION = "9.1.65"
|
SCOVERSION = "9.1.66"
|
||||||
|
|
||||||
SCONAME = "ScoDoc"
|
SCONAME = "ScoDoc"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user