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

def CMFBibliographyAT::tool::bibliography::BibliographyTool::needsUpgrade (   self  ) 

Returns True if one of the first 5 bibitems found
has the old 'publication_authors' attribute; called
by the installer to figure out whether a schema update
is needed.

Definition at line 367 of file bibliography.py.

00367                           :
        """Returns True if one of the first 5 bibitems found
        has the old 'publication_authors' attribute; called
        by the installer to figure out whether a schema update
        is needed."""
        ct = getToolByName(self, 'portal_catalog')
        brains = ct(portal_type=self.getReferenceTypes())
        if not brains:
            return False
        for brain in brains[:5]:
            if getattr(brain.getObject(), 'publication_authors', False):
                return True
        return False

    ## XXX just to have this in trusted code


Generated by  Doxygen 1.6.0   Back to index