Fix message_list loop with a map

This commit is contained in:
Norman Jäckel 2013-05-23 23:19:53 +02:00
parent 894f16ec53
commit c94f78c430

View File

@ -678,11 +678,9 @@ class MotionLog(models.Model):
Return a string, representing the log message.
"""
time = formats.date_format(self.time, 'DATETIME_FORMAT')
return_message = '%s ' % time
for message in self.message_list:
return_message += _(message)
return_message = '%s ' % time + ''.join(map(_, self.message_list))
if self.person is not None:
return_message += ' by %s' % self.person
return_message += _(' by %s') % self.person
return return_message