openwisp/openwisp-notifications

[bug] Creating a superuser using management command does not create notification settings

pandafy opened this issue · 1 comments

@pniaps reported on Gitter chat that while creating a super user in the development environment, appropriate notification setting objects were not being created.

Upon looking into celery logs, I found out that is happening because the task for creating notification settings is getting executed before user is saved to the database.

I think it will be a good idea to wrap the code that performs operation on data fetched from the database.

Duplicate of #165