add exception handler

This commit is contained in:
2020-10-27 12:59:19 +00:00
parent 32fe76f8ae
commit fd8df68deb
2 changed files with 16 additions and 3 deletions

View File

@@ -74,10 +74,18 @@ def show(request, id=None):
ep_protocol_link = "#"
if p.has_agenda and p.agenda_key:
ep_agenda_link = get_pad_link(p.agenda_key)
try:
ep_agenda_link = get_pad_link(p.agenda_key)
except Exception as e:
logger.error("Can't get the agenda link from '{}'. Error: {}".format(p.agenda_key, e))
ep_agenda_link = "#"
if p.has_protocol and p.protocol_key:
ep_protocol_link = get_pad_link(p.protocol_key)
try:
ep_protocol_link = get_pad_link(p.protocol_key)
except Exception as e:
logger.error("Can't get the protocol link from '{}'. Error: {}".format(p.protocol_key, e))
ep_protocol_link = "#"
context = {
"post": p,