Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Organization.DoesNotExist openwisp_notifications.tasks.ns_organization_created #238

Closed
nemesifier opened this issue May 21, 2022 · 0 comments · Fixed by #242
Closed

Comments

@nemesifier
Copy link
Member

nemesifier commented May 21, 2022

When creating a new org in a prod system this exception pops up.

I think it's because we have to use transaction.on_commit on the handler as we use for the other receivers, otherwise the celery task is spawned before the transaction is saved to the DB and the organization does not exist yet.

Keep in mind that when doing this, some tests may fail because transactions are not enabled in TestCase, for that reason the on_commit may not be triggered, for that reason some tests run in TransactionTestCase

@nemesifier nemesifier added the bug Something isn't working label May 21, 2022
@nemesifier nemesifier added this to Backlog in OpenWISP Priorities for next releases via automation May 21, 2022
@nemesifier nemesifier added this to To do (general) in OpenWISP Contributor's Board via automation May 21, 2022
@nemesifier nemesifier moved this from To do (general) to To do (Python & Django) in OpenWISP Contributor's Board May 21, 2022
@nemesifier nemesifier moved this from Backlog to To do in OpenWISP Priorities for next releases May 21, 2022
@yashikajotwani12 yashikajotwani12 self-assigned this Jun 8, 2022
yashikajotwani12 added a commit that referenced this issue Jun 10, 2022
yashikajotwani12 added a commit that referenced this issue Jun 10, 2022
yashikajotwani12 added a commit that referenced this issue Jun 10, 2022
yashikajotwani12 added a commit that referenced this issue Jun 10, 2022
@yashikajotwani12 yashikajotwani12 moved this from To do to In progress in [GSoC 22] Monitoring improvements Jun 10, 2022
@yashikajotwani12 yashikajotwani12 moved this from In progress to Review in progress in [GSoC 22] Monitoring improvements Jun 20, 2022
OpenWISP Contributor's Board automation moved this from To do (Python & Django) to Done Jun 30, 2022
OpenWISP Priorities for next releases automation moved this from To do to Done Jun 30, 2022
[GSoC 22] Monitoring improvements automation moved this from Review in progress to Done Jun 30, 2022
nemesifier pushed a commit that referenced this issue Jun 30, 2022
@pandafy pandafy mentioned this issue Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants