1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-01-03 01:17:56 +03:00

Updated so, when a parent is deleted, all children are also deleted.

This commit is contained in:
Adolfo Gómez 2013-05-14 12:16:33 +00:00
parent 2271f73714
commit a4cc0a47f2

View File

@ -778,6 +778,9 @@ class User(models.Model):
# be removed
toDelete.getManager().removeUser(toDelete.name)
# now removes all "child" of this user, if it has children
User.objects.filter(parent=toDelete.id).delete()
# Remove related logs
log.clearLogs(toDelete)