do not fail looking for audio on event without commission

This commit is contained in:
Frédéric Péters 2011-12-07 20:55:13 +01:00
parent b1f0b3a33e
commit cd7d298ea7
1 changed files with 2 additions and 0 deletions

View File

@ -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' % (