Commit ec7e449c authored by Łukasz Nowak's avatar Łukasz Nowak

fix "Feature computer remove unused software"

Handle only public computers or forever closed, as other scopes are
reserved for personal or project usage.
parent 3d7dfe5b
...@@ -19,6 +19,9 @@ if computer is None: ...@@ -19,6 +19,9 @@ if computer is None:
return return
if computer.Computer_getSoftwareReleaseUsage(url_string) != 0: if computer.Computer_getSoftwareReleaseUsage(url_string) != 0:
return return
if computer.getAllocationScope() not in ['open/public', 'open/subscription', 'close/forever']:
# handle only some specific computers: public ones and removed
return
software_installation.requestDestroy( software_installation.requestDestroy(
comment='Destroyed by %s as %s is archived.' % (script.id, software_release.getRelativeUrl(),)) comment='Destroyed by %s as %s is archived.' % (script.id, software_release.getRelativeUrl(),))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment