File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -51,16 +51,15 @@ def safe_delete(object: gitlab.base.RESTObject) -> None:
5151 # which combined with parents group never immediately deleting in GL 16
5252 # we shouldn't cause test to fail if it still exists
5353 return
54- elif (
55- type (object ) is gitlab .v4 .objects .Project
56- or type (object ) is gitlab .v4 .objects .Group
57- ):
54+ elif type (object ) is gitlab .v4 .objects .Project :
5855 # Immediately delete rather than waiting for at least 1day
5956 # https://docs.gitlab.com/ee/api/projects.html#delete-project
60- # https://docs.gitlab.com/ee/api/projects.html#delete-group
6157 object .delete (permanently_remove = True )
6258 pass
6359 else :
60+ # We only attempt to delete parent groups to prevent dangling sub-groups
61+ # However parent groups can only be deleted on a delay in Gl 16
62+ # https://docs.gitlab.com/ee/api/projects.html#delete-group
6463 object .delete ()
6564 except gitlab .exceptions .GitlabDeleteError :
6665 logging .info (f"{ object !r} already deleted or scheduled for deletion." )
You can’t perform that action at this time.
0 commit comments