Skip to content

Commit

Permalink
fix: Fixed issue related to Django 4
Browse files Browse the repository at this point in the history
  • Loading branch information
abates committed Aug 15, 2024
1 parent cbb3caf commit 55355f7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions nautobot_design_builder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
Expand Down
1 change: 0 additions & 1 deletion nautobot_design_builder/tests/test_design_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 55355f7

Please sign in to comment.