From 3b7db0cba85763d29390b7b70a7833bcebccafbd Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 29 Oct 2025 12:27:12 -0400 Subject: [PATCH] Fixes #349: Calculate conflicts for ChangeDiff only when both original and current data exist --- netbox_branching/models/changes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netbox_branching/models/changes.py b/netbox_branching/models/changes.py index 68e91a0..72fc4dd 100644 --- a/netbox_branching/models/changes.py +++ b/netbox_branching/models/changes.py @@ -191,6 +191,9 @@ def _update_conflicts(self): """ Record any conflicting changes between the modified and current object data. """ + if self.original is None or self.current is None: + # Both the original and current states must be available to compare + return conflicts = None if self.action == ObjectChangeActionChoices.ACTION_UPDATE: conflicts = [