pass groupname only to delete_ldap_group_if_empty

This commit is contained in:
Jan Dittberner 2014-05-30 17:18:42 +02:00
parent 561b2d64db
commit 6a40a5eded
2 changed files with 3 additions and 3 deletions

View file

@ -57,7 +57,7 @@ class Group(TimeStampedModel, models.Model):
return self
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)
@ -138,7 +138,7 @@ class User(TimeStampedModel, models.Model):
]:
remove_ldap_user_from_group.delay(self.username, group.groupname)
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()
super(User, self).delete(*args, **kwargs)

View file

@ -39,5 +39,5 @@ def delete_ldap_user(user):
@shared_task
def delete_ldap_group_if_empty(group):
def delete_ldap_group_if_empty(groupname):
pass