Skip to content

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

@nemesifier

Description

@nemesifier

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions