From a6b719500e4067802b2f1795e308b5fb3bcee805 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 24 Mar 2011 10:01:56 +0000 Subject: [PATCH] Wrap the sdo name query in a try clause to avoid server 500 errors. - Legacy-Id: 2905 --- ietf/liaisons/accounts.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ietf/liaisons/accounts.py b/ietf/liaisons/accounts.py index 17ff91077..cf85dfd80 100644 --- a/ietf/liaisons/accounts.py +++ b/ietf/liaisons/accounts.py @@ -105,7 +105,10 @@ def is_sdo_manager_for_outgoing_liaison(person, liaison): from_entity = IETFHM.get_entity_by_key(liaison.from_raw_code) sdo = None if not from_entity: - sdo = SDOs.objects.get(sdo_name=liaison.from_body()) + try: + sdo = SDOs.objects.get(sdo_name=liaison.from_body()) + except SDOs.DoesNotExist: + pas elif isinstance(from_entity, SDOEntity): sdo = from_entity.obj if sdo: