We don't want this to call .error() for legit logs already completed

This commit is contained in:
Alexandre Aubin 2019-10-14 20:28:16 +02:00
parent ce1cabc680
commit 61931f2c4b

View file

@ -502,7 +502,10 @@ class OperationLogger(object):
The missing of the message below could help to see an electrical The missing of the message below could help to see an electrical
shortage. shortage.
""" """
self.error(m18n.n('log_operation_unit_unclosed_properly')) if self.ended_at is not None or self.started_at is None:
return
else:
self.error(m18n.n('log_operation_unit_unclosed_properly'))
def _get_description_from_name(name): def _get_description_from_name(name):