Logo Search packages:      
Sourcecode: zope-attachmentfield version File versions  Download package

def AttachmentField::AttachmentFieldTool::AttachmentFieldTool::migrate (   self  ) 

    Check that all properties are present and correctly initialized.
    If not, install them with a safe default value.
    It is safe to call it multiple times.

Definition at line 85 of file AttachmentFieldTool.py.

00085                      :
        """
            Check that all properties are present and correctly initialized.
            If not, install them with a safe default value.
            It is safe to call it multiple times.
        """
        checkFor = [
            ("contentDisposition", self.getAvailableContentDisposition()[0]),
            ("currentFlexStorageBackend", "AttributeStorage"), ## ZODB
        ]
        rValue = ""
        for attr, default in checkFor:
            if not hasattr(self, attr):
                setattr(self, attr, default)
                rValue += "Added: %s\n" % attr
        if rValue == "":
            return "Tool was already up to date."
        return rValue + "\nTool succesfully updated!"


    def getAvailableContentDisposition(self):


Generated by  Doxygen 1.6.0   Back to index