def generate_attachment_preview_images(obj): if (IAttachmentStoragable is not None and IAttachmentStoragable.providedBy(obj)): attachment_storage = IAttachmentStorage(obj) for att_id in attachment_storage.keys(): docconv = IDocconv(attachment_storage.get(att_id)) if not docconv.has_thumbs(): docconv.generate_all()
def generate_attachment_preview_images(obj): if not IAttachmentStoragable.providedBy(obj): return attachment_storage = IAttachmentStorage(obj) for att_id in attachment_storage.keys(): attachment = attachment_storage.get(att_id) if not pi_api.previews.has_previews(attachment): pi_api.previews.generate_previews(attachment)
def generate_attachment_preview_images(obj): if not IAttachmentStoragable.providedBy(obj): return attachment_storage = IAttachmentStorage(obj) for att_id in attachment_storage.keys(): attachment = attachment_storage.get(att_id) if not pi_api.previews.has_previews(attachment): pi_api.previews.generate_previews(attachment)
def generate_attachment_preview_images(obj): if not IAttachmentStoragable.providedBy(obj): return attachment_storage = IAttachmentStorage(obj) for att_id in attachment_storage.keys(): attachment = attachment_storage.get(att_id) if not pi_api.previews.has_previews(attachment): log.debug('generate_attachment_preview_images' ' - generating attachment preview') generate_previews_async(attachment)