un-fleshing age_protect object on copy update to prevent update failure
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 21 Sep 2006 13:41:06 +0000 (13:41 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 21 Sep 2006 13:41:06 +0000 (13:41 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@6174 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Cat.pm

index fce55b4..c9f1ba5 100644 (file)
@@ -1049,6 +1049,9 @@ sub update_copy {
        $copy->editor($editor->requestor->id);
        $copy->edit_date('now');
 
+       $copy->age_protect( $copy->age_protect->id )
+               if ref $copy->age_protect;
+
        fix_copy_price($copy);
        return $editor->event unless
                $editor->update_asset_copy(