CAAERS-6938 conditionally include attachment