don't append to the activity stream on LDAP group disassociate

for organizations w/ a large number of ldap orgs/teams, this results in
a _huge_ number of extraneous activity stream entries

see: https://github.com/ansible/ansible-tower/issues/7655
This commit is contained in:
Ryan Petrello
2017-09-18 14:15:03 -04:00
committed by Matthew Jones
parent 70f8ec78de
commit f2f42c2c8a

View File

@@ -307,7 +307,7 @@ def _update_m2m_from_groups(user, ldap_user, rel, opts, remove=True):
should_add = True should_add = True
if should_add: if should_add:
rel.add(user) rel.add(user)
elif remove: elif remove and user in rel.all():
rel.remove(user) rel.remove(user)