# Nested Transactions and Django Signals Caused Incorrect Payout Notifications

DevFeed: [Nested Transactions and Django Signals Caused Incorrect Payout Notifications](<https://devfeed.tech/articles/one-database-transaction-too-many-33899.md>)

Original publisher: [Read original article](<https://hakibenita.com/django-nested-transaction>)

Author: Haki Benita

Published: 2021-06-06T21:00:00Z

Content type: article

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [Transactions](<https://devfeed.tech/topics/transactions.md>), [Django](<https://devfeed.tech/topics/django.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [database](<https://devfeed.tech/tags/database.md>), [django](<https://devfeed.tech/tags/django.md>), [messages](<https://devfeed.tech/tags/messages.md>), [orm](<https://devfeed.tech/tags/orm.md>), [transactions](<https://devfeed.tech/tags/transactions.md>), [users](<https://devfeed.tech/tags/users.md>)

## AI overview

This article examines how nested database transactions and Django signals caused users to receive payout notifications before their payments were reliably completed. It uses the incident to explain a lesson about coordinating transaction state and notifications.

## Source excerpt

A story about how I ended up sending hundreds of users messages saying they got paid when they didn't! In the process we've learned a valuable lesson about nested transactions and Django signals.