[Zope3-dev] possible bug in zc.relationship when passing empty container as target in isLinked

Gary Poster gary at zope.com
Tue Jan 23 09:30:44 EST 2007


On Jan 23, 2007, at 3:20 AM, Shaar Gabriel wrote:

> Hi
> i think i found a bug in zc.relationship svn.
> the bug is in shared.AbstractContainer.isLinked
> if the target parameter is a container with no objects, then it  
> resolves to
> False in a bool context and tokenization fails
>
> target and tokenize({'target': target})
>
> returns the target instead of the result of the tokenize function.

Hi Shaar.  Sounds right.  I'd like to fix this, but I don't have a  
whole lot of time, and I'd really like to include a test for this  
with the fix.  Do you happen to have time to write a quick  
illustrative test, ideally in the form of a doctest?  If so, and you  
send me the diff, that will really speed things up.

Thanks

Gary



More information about the Zope3-dev mailing list