[Zope-CMF] Re: ActionProviderBase fix for migration problem

Tres Seaver tseaver at zope.com
Thu Mar 11 07:57:52 EST 2004


Christian Heimes wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello!
> 
> Some people reported migration problems for migration from plone using
> an older version of CMF to plone 2 with CMF 1.4.2. The flag 'visible'
> isn't an integer or isn't convertable to an int with int() in some
> cases. This code sometimes breaks when called form
> TypesTool:_convertActions()
> 
> ActionProviderBase:addAction()
> ~    [...]
> ~        new_action = ActionInformation( id=str(id)
> ~                                      , title=str(name)
> ~                                      , action=a_expr
> ~                                      , condition=c_expr
> ~                                      , permissions=permission
> ~                                      , category=str(category)
> ~                                      , visible=int(visible)
> ~                                      )
> 
> I would like to chance 'visible=int(visible)' to 'not not visible'. The
> bool() method would be nicer but it's not available in python 2.1

+1.  I actually like the "who's there?" idiom ( "not not -- who's 
there"), but I confess it is hard to figure out if you aren't used to it.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver at zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com




More information about the Zope-CMF mailing list