Skip to content

Commit 584a9b0

Browse files
committed
[-] Use pk instead of id in pre_save object lookup
1 parent 66b6219 commit 584a9b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

easyaudit/signals/model_signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def pre_save(sender, instance, raw, using, update_fields, **kwargs):
6464

6565
# Query the object, see if it exists
6666
try:
67-
old_model = sender.objects.get(id=instance.pk)
67+
old_model = sender.objects.get(pk=instance.pk)
6868
created = False
6969
except (sender.DoesNotExist, ):
7070
old_model = None

0 commit comments

Comments
 (0)