mirror of https://github.com/jumpserver/jumpserver
Add
parent
7825c107ab
commit
9518672ad2
|
@ -23,6 +23,7 @@ class UserGroup(NoDeleteModelMixin, Group):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
def delete(self, using=None, keep_parents=False):
|
def delete(self, using=None, keep_parents=False):
|
||||||
|
self.group_ptr.delete()
|
||||||
if self.name != 'Default':
|
if self.name != 'Default':
|
||||||
self.users.clear()
|
self.users.clear()
|
||||||
return super(UserGroup, self).delete()
|
return super(UserGroup, self).delete()
|
||||||
|
|
Loading…
Reference in New Issue