From ece0d0cdcd8d7f24caa996c00ce6dae8ed18b4ee Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 23 Feb 2022 11:34:28 +0100 Subject: [PATCH] Clear comment on reset after successful publish --- openpype/tools/pyblish_pype/control.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openpype/tools/pyblish_pype/control.py b/openpype/tools/pyblish_pype/control.py index d479124be1..6f89952c22 100644 --- a/openpype/tools/pyblish_pype/control.py +++ b/openpype/tools/pyblish_pype/control.py @@ -229,7 +229,13 @@ class Controller(QtCore.QObject): self.log.debug("Resetting pyblish context object") comment = None - if self.context is not None and self.context.data.get("comment"): + if ( + self.context is not None and + self.context.data.get("comment") and + # We only preserve the user typed comment if we are *not* + # resetting from a successful publish without errors + self._current_state != "Published" + ): comment = self.context.data["comment"] self.context = pyblish.api.Context()