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

Signals are not being sent/ received #123

Open
jadamson93 opened this issue Feb 20, 2017 · 3 comments
Open

Signals are not being sent/ received #123

jadamson93 opened this issue Feb 20, 2017 · 3 comments
Labels

Comments

@jadamson93
Copy link

I am working on an application that utilizes the signals emitted from the user_added and user_removed events from organizations.signals. However, they don't appear to be firing, or I am unable to receive them. Signals defined from my own application are being received. Below is the extracted sample:

from organizations.signals import user_added, user_removed
from organizations.models import Organization
from django.dispatch import receiver


@receiver(user_added, sender=Organization)
def usercreated(sender, **kwargs):
    print("A User was added")

@receiver(user_removed, sender=Organization)
def userremoved(sender, **kwargs):
    print("A User was removed")

It appears as though the tests in Travis are passing on the latest build. Working with Django 1.10.5, django-organizations .90, and Python 3.6. Actions were taken both from the Admin dashboard as well as with the actions defined in the /organizations application space, though they should be the same.

@bennylope
Copy link
Owner

For context, which organization models are you using? The concrete models? Abstract base models?

@jadamson93
Copy link
Author

jadamson93 commented Feb 22, 2017 via email

@mwisner
Copy link

mwisner commented Jul 8, 2017

I am also running into this issue except we're using the abstract models + our own Org models.

It does appear that using the django admin area to add / remove users to an organization doesn't use the add_user / etc methods.

But if you call them directly the signals do fire.

@bennylope bennylope added the bug label Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants