pass groupname only to delete_ldap_group_if_empty
This commit is contained in:
parent
561b2d64db
commit
6a40a5eded
2 changed files with 3 additions and 3 deletions
|
@ -57,7 +57,7 @@ class Group(TimeStampedModel, models.Model):
|
||||||
return self
|
return self
|
||||||
|
|
||||||
def delete(self, *args, **kwargs):
|
def delete(self, *args, **kwargs):
|
||||||
delete_ldap_group_if_empty.delay(self)
|
delete_ldap_group_if_empty.delay(self.groupname)
|
||||||
super(Group, self).delete(*args, **kwargs)
|
super(Group, self).delete(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ class User(TimeStampedModel, models.Model):
|
||||||
]:
|
]:
|
||||||
remove_ldap_user_from_group.delay(self.username, group.groupname)
|
remove_ldap_user_from_group.delay(self.username, group.groupname)
|
||||||
delete_ldap_user.delay(self)
|
delete_ldap_user.delay(self)
|
||||||
delete_ldap_group_if_empty.delay(self.group)
|
delete_ldap_group_if_empty.delay(self.group.groupname)
|
||||||
self.group.delete()
|
self.group.delete()
|
||||||
super(User, self).delete(*args, **kwargs)
|
super(User, self).delete(*args, **kwargs)
|
||||||
|
|
||||||
|
|
|
@ -39,5 +39,5 @@ def delete_ldap_user(user):
|
||||||
|
|
||||||
|
|
||||||
@shared_task
|
@shared_task
|
||||||
def delete_ldap_group_if_empty(group):
|
def delete_ldap_group_if_empty(groupname):
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue