Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions imio/dms/mail/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,23 +1053,7 @@ def get(self):
class StoredPodTemplate(object):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's missing DXStoredFile here.

After that, I still get error *** AttributeError: file when adapting my "PODTemplate" file with IStoredFile

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added the baseclass. That attributeerror indicates, that your adapter is not properly kicking in and it's using the upstream collective.collabora adapter instead - is it true that you get this error already on your own code? I don't have a working dms.mail install so I can't trace this for you.

Copy link
Contributor

@chris-adam chris-adam Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in fact, I get an error "This page does not exist" when visiting "/my-pod-file/@@collabora-edit" that I was not having before.
Using a breakpoint in CollaboraEditView's init method showed me the error on line 44. I have no logs otherwise

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I said, I don't have a working interactive install. If you'd like me to fix this, I need an integrationtest that reproduces the failure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"""Access the file storage on a PODTemplate content object.

i.e. the file attribute on the content object.
i.e. the ``odt_file`` attribute on the content object.
"""

def __init__(self, context):
self.context = context
self.filename = context.odt_file.filename
self.contentType = context.odt_file.contentType

@property
def data(self):
return self.context.odt_file.data

@data.setter
def data(self, data):
self.context.odt_file = NamedBlobFile(
data=data, filename=self.filename, contentType=self.contentType
)

def getSize(self):
return self.context.odt_file.getSize()
file_field_name = "odt_file"
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! -*- coding: utf8 -*-
#! -*- coding: utf-8 -*-

from setuptools import find_packages
from setuptools import setup
Expand Down Expand Up @@ -48,6 +48,7 @@
"collective.ckeditor",
"collective.ckeditortemplates",
"collective.classification.folder",
"collective.collabora>=1.1.0",
"collective.contact.core",
"collective.contact.contactlist",
"collective.contact.duplicated",
Expand Down