From 1a74db36bb4d32ee85119d1873c487cfb15c967e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 7 Dec 2011 20:55:40 +0100 Subject: [PATCH] do not fail looking for audio on event without commission --- tabellio/pfbviews/comevent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tabellio/pfbviews/comevent.py b/tabellio/pfbviews/comevent.py index 07039f6..49ec9c5 100644 --- a/tabellio/pfbviews/comevent.py +++ b/tabellio/pfbviews/comevent.py @@ -6,6 +6,8 @@ import tabellio.config.utils class CommissionView(ParlEventBaseView): def get_stream_name(self): + if not self.context.commission: + return 'XXXX' com_id = self.context.commission.to_path.split('/')[-1] com_audio_code = tabellio.config.utils.get_com_audio_code(com_id) filename = '%04d%02d%02d%02d-%s.mp3' % (