From f878d61f3a916a308d777e7358fb754f595bcc33 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 1 Apr 2021 15:55:46 +0200 Subject: [PATCH] log.py: don't inject log_ref if the operation didnt start yet --- src/yunohost/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 7a45565f8..592e76bb4 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -636,7 +636,7 @@ class OperationLogger(object): # we want to inject the log ref in the exception, such that it may be # transmitted to the webadmin which can then redirect to the appropriate # log page - if isinstance(error, Exception) and not isinstance(error, YunohostValidationError): + if self.started_at and isinstance(error, Exception) and not isinstance(error, YunohostValidationError): error.log_ref = self.name if self.ended_at is not None or self.started_at is None: