fix(training): catch missing date in training title

pull/174/head
mariusrklein 2 months ago
parent f9de181f7f
commit 749c15f919

@ -2058,7 +2058,9 @@ class MemberTraining(CommonModel):
'image/gif'])
def __str__(self):
return self.title + ' ' + self.date.strftime('%d.%m.%Y')
if self.date:
return self.title + ' ' + self.date.strftime('%d.%m.%Y')
return self.title + ' ' + str(_('(no date)'))
def get_activities(self):
activity_string = ', '.join(a.name for a in self.activity.all())

Loading…
Cancel
Save