diff --git a/nautobot_design_builder/models.py b/nautobot_design_builder/models.py index 58d49b7..9dd4e02 100644 --- a/nautobot_design_builder/models.py +++ b/nautobot_design_builder/models.py @@ -619,6 +619,9 @@ def revert(self, local_logger: logging.Logger = logger): # pylint: disable=too- # deletion since this delete operation is part of an owning design. self.design_object._current_deployment = self.change_set.deployment # pylint: disable=protected-access self.design_object.delete() + # This refreshes the field to prevent + # `save() prohibited to prevent data loss due to unsaved related object` + self.design_object # pylint:disable=pointless-statement local_logger.info( "%s %s has been deleted as it was owned by this design", object_type, object_str, extra={"object": self} ) diff --git a/nautobot_design_builder/tests/test_design_job.py b/nautobot_design_builder/tests/test_design_job.py index 5516c76..33b1464 100644 --- a/nautobot_design_builder/tests/test_design_job.py +++ b/nautobot_design_builder/tests/test_design_job.py @@ -272,7 +272,6 @@ def test_update_integration_design(self): # This is a second, and third run with new input to update the deployment for i in range(2): - print("\n\nJob", i) data = copy.copy(original_data) if i == 0: data["device_b"] = self.device3 diff --git a/tasks.py b/tasks.py index 0a19af4..5eac50a 100644 --- a/tasks.py +++ b/tasks.py @@ -48,7 +48,7 @@ def is_truthy(arg): namespace.configure( { "nautobot_design_builder": { - "nautobot_ver": "2.2", + "nautobot_ver": "stable", "project_name": "nautobot-design-builder", "python_ver": "3.11", "local": False,