From bbd6f9d96cb40e4c5feb5eb8a4d9bd7cf504cc38 Mon Sep 17 00:00:00 2001 From: Andrew Bates Date: Wed, 27 Mar 2024 15:15:32 -0400 Subject: [PATCH] Fixed logging of created objects (#125) --- nautobot_design_builder/design.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nautobot_design_builder/design.py b/nautobot_design_builder/design.py index 6d9cb2df..660a003b 100644 --- a/nautobot_design_builder/design.py +++ b/nautobot_design_builder/design.py @@ -600,12 +600,12 @@ def save(self): try: self.instance.full_clean() self.instance.save(**self.metadata.save_args) + self.environment.journal.log(self) self.metadata.created = False if self._parent is None: self.environment.log_success( message=f"{msg} {self.model_class.__name__} {self.instance}", obj=self.instance ) - self.environment.journal.log(self) # Refresh from DB so that we update based on any # post save signals that may have fired. self.instance.refresh_from_db()