Commit 3a2a21f1 authored by Leigh B Stoller's avatar Leigh B Stoller

Bug Fix: Couple of fixes to Delete() requested by Chuck Cranor.

parent 8ef644d1
...@@ -1180,8 +1180,19 @@ sub Delete($;$) ...@@ -1180,8 +1180,19 @@ sub Delete($;$)
or goto bad; or goto bad;
} }
if ($self->ezid()) { if ($self->ezid()) {
DBQueryWarn("delete from os_submap where osid='$imageid'") # Cannot be a child or parent if I be dead.
DBQueryWarn("delete from os_submap where ".
" osid='$imageid' or parent_osid='$imageid'")
or goto bad; or goto bad;
# Ditto.
DBQueryWarn("update os_info_versions set def_parentosid=null ".
" where def_parentosid='$imageid' and deleted is null")
or goto bad;
# Ditto
DBQueryWarn("update os_info_versions set nextosid=null ".
" where nextosid='$imageid' and deleted is null")
or goto bad;
DBQueryWarn("delete from os_info where osid='$imageid'") DBQueryWarn("delete from os_info where osid='$imageid'")
or goto bad; or goto bad;
if ($purge || !$DOPROVENANCE) { if ($purge || !$DOPROVENANCE) {
......
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