diff --git a/app/apps/api/views/transactions.py b/app/apps/api/views/transactions.py index c07ae46..dc1d6f9 100644 --- a/app/apps/api/views/transactions.py +++ b/app/apps/api/views/transactions.py @@ -32,7 +32,7 @@ class TransactionViewSet(viewsets.ModelViewSet): transaction_created.send(sender=instance) def perform_update(self, serializer): - old_data = deepcopy(Transaction.objects.get(pk=serializer.data["pk"])) + old_data = deepcopy(self.get_object()) instance = serializer.save() transaction_updated.send(sender=instance, old_data=old_data)