mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
action set attribute is_published of deleted asset versions to False
This commit is contained in:
parent
e0f0b48afc
commit
1944cbdd72
1 changed files with 18 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue