Fix message_list loop with a map
This commit is contained in:
parent
894f16ec53
commit
c94f78c430
@ -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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user