From: mike <svn...@pl...> - 2006-07-31 21:39:06
|
Author: mike Date: Mon Jul 31 21:39:03 2006 New Revision: 26564 Modified: CMFBibliographyAT/trunk/tool/bibliography.py Log: renamed needsUpgrade to needsAuthorSchemaUpgrade same for upgrade method itself this code will move into the migration section of this products soon Modified: CMFBibliographyAT/trunk/tool/bibliography.py ============================================================================== --- CMFBibliographyAT/trunk/tool/bibliography.py (original) +++ CMFBibliographyAT/trunk/tool/bibliography.py Mon Jul 31 21:39:03 2006 @@ -216,7 +216,6 @@ renders a BibliographyEntry object in the specified format """ renderer = self.getRenderer(format) - if renderer: return renderer.render(entry) else: @@ -394,7 +393,7 @@ if authors is not None: migrateAuthors(obj) - def needsUpgrade(self): + def needsAuthorSchemaUpgrade(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 @@ -403,11 +402,12 @@ brains = ct(portal_type=self.getReferenceTypes()) if not brains: return False - for brain in brains[:5]: + + # needs schema upgrade for authors field + for brain in brains[:5]: if getattr(brain.getObject(), 'publication_authors', False): return True - return False - + ## XXX just to have this in trusted code def getSortedMemberIds(self): """Return the ids like the membership tool but sorted (by id)""" |