File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1919from .contextvars import active_branch
2020from .events import *
2121from .models import Branch , ChangeDiff
22+ from .utilities import deactivate_branch
2223
2324__all__ = (
2425 'check_pending_migrations' ,
@@ -79,8 +80,9 @@ def record_change_diff(instance, **kwargs):
7980 current_data = None
8081 else :
8182 model = instance .changed_object_type .model_class ()
82- obj = model .objects .using (DEFAULT_DB_ALIAS ).get (pk = instance .changed_object_id )
83- current_data = serialize_object (obj , exclude = ['created' , 'last_updated' ])
83+ with deactivate_branch ():
84+ obj = model .objects .get (pk = instance .changed_object_id )
85+ current_data = serialize_object (obj , exclude = ['created' , 'last_updated' ])
8486 diff = ChangeDiff (
8587 branch = branch ,
8688 object = instance .changed_object ,
You can’t perform that action at this time.
0 commit comments