fix if there is no etherpad, no pdf file should be generated.
This commit is contained in:
@@ -142,25 +142,17 @@ def show(request, id=None):
|
||||
filename_agenda = None
|
||||
filename_protocol = None
|
||||
|
||||
if p.has_agenda: # and p.agenda_key:
|
||||
try:
|
||||
ep_agenda_link = get_pad_link(p.agenda_key)
|
||||
filename_agenda = p.slug + "-agenda.pdf"
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"Can't get the agenda link from '%s'. Error: %s", p.agenda_key, e
|
||||
)
|
||||
ep_agenda_link = "#"
|
||||
if p.has_agenda:
|
||||
ep_agenda_link = get_pad_link(p.agenda_key)
|
||||
|
||||
if p.has_protocol: # and p.protocol_key:
|
||||
try:
|
||||
ep_protocol_link = get_pad_link(p.protocol_key)
|
||||
if ep_agenda_link != "#":
|
||||
filename_agenda = p.slug + "-agenda.pdf"
|
||||
|
||||
if p.has_protocol:
|
||||
ep_protocol_link = get_pad_link(p.protocol_key)
|
||||
|
||||
if ep_protocol_link != "#":
|
||||
filename_protocol = p.slug + "-protokoll.pdf"
|
||||
except Exception as e:
|
||||
logger.error(
|
||||
"Can't get the protocol link from '%s. Error: %s", p.protocol_key, e
|
||||
)
|
||||
ep_protocol_link = "#"
|
||||
|
||||
related_posts = p.tags.similar_objects()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user