action set attribute is_published of deleted asset versions to False

This commit is contained in:
iLLiCiTiT 2020-02-28 16:43:31 +01:00
parent e0f0b48afc
commit 1944cbdd72

View file

@ -361,6 +361,24 @@ class DeleteOldVersions(BaseAction):
self.dbcon.uninstall()
for entity in entities:
entity["is_published"] = False
try:
session.commit()
except Exception:
msg = (
"Could not set `is_published` attribute to `False`"
" for selected AssetVersions."
)
self.log.warning(msg, exc_info=True)
return {
"success": False,
"message": msg
}
return True
def delete_whole_dir_paths(self, dir_paths):