pull/530/head
ibuler 2017-03-02 18:29:29 +08:00
parent 7825c107ab
commit 9518672ad2
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ class UserGroup(NoDeleteModelMixin, Group):
return self.name
def delete(self, using=None, keep_parents=False):
self.group_ptr.delete()
if self.name != 'Default':
self.users.clear()
return super(UserGroup, self).delete()