Index: openacs-4/packages/attachments/tcl/attachments-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/tcl/attachments-procs.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/attachments/tcl/attachments-procs.xql 19 Jun 2018 15:55:27 -0000 1.4 +++ openacs-4/packages/attachments/tcl/attachments-procs.xql 20 Jun 2018 07:33:36 -0000 1.5 @@ -57,14 +57,10 @@ - update attachments - set approved_p = ( - case when :approved_p is not null - then :approved_p - else not approved_p - end) + update attachments set + approved_p = coalesce(:approved_p, not approved_p) where object_id = :object_id - and item_id = :item_id + and item_id = :item_id